/* Moments owns the lightweight personal-post UI shared by My Cards and profiles. */
body.my-night-route,
body.public-profile-route,
body.moment-route,
body.account-route {
  --moment-surface: #fff;
  --moment-soft: #f4f3f8;
  --moment-line: #dedce7;
  --moment-text: #17161c;
  --moment-muted: #777380;
  --moment-purple: #684cff;
  --moment-green: #00d90a;
  --moment-card-shadow: 0 8px 22px rgba(24, 20, 42, .12);
}

body.night-mode.my-night-route,
body.night-mode.public-profile-route,
body.night-mode.moment-route,
body.night-mode.account-route {
  --moment-surface: #17171a;
  --moment-soft: #202024;
  --moment-line: #343239;
  --moment-text: #f6f5f8;
  --moment-muted: #aaa6b0;
  --moment-card-shadow: 0 8px 22px rgba(0, 0, 0, .32);
}

body.moment-route,
body.day-mode.moment-route,
body.moment-route #app,
body.day-mode.moment-route #app {
  background: #f5f5f7;
}

body.night-mode.moment-route,
body.night-mode.moment-route #app {
  background: #111114;
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.night-create-chooser) {
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.night-create-chooser) [data-night-checkin-content],
body.my-night-route .night-action-sheet .night-create-chooser,
body.my-night-route .night-action-sheet .night-create-options {
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.night-create-chooser) .night-sheet-close {
  top: -42px;
  right: 0;
  color: #fff;
}

.night-action-sheet .night-create-chooser {
  padding: 0;
  color: var(--moment-text);
}

.night-action-sheet .moment-create {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 32px;
  color: var(--moment-text);
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.moment-create) {
  overflow-x: hidden;
  scrollbar-width: none;
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.moment-create)::-webkit-scrollbar {
  display: none;
}

body.my-night-route .night-action-sheet .night-checkin-sheet:has(.moment-create) [data-night-checkin-content],
.night-action-sheet .moment-create form,
.night-action-sheet .moment-create form > * {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.night-action-sheet .moment-create .section-head {
  margin-bottom: 22px;
}

.night-action-sheet .moment-create h2 {
  margin: 4px 0 0;
  color: var(--moment-text);
  font-size: 26px;
  line-height: 1.1;
}

.night-action-sheet .moment-create .section-head > p:last-child {
  margin: 9px 0 0;
  color: var(--moment-muted);
  font-size: 13px;
  line-height: 1.45;
}

.night-create-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow: visible;
  border-radius: 0;
}

.night-create-options button {
  display: grid;
  min-height: 132px;
  justify-items: start;
  align-content: end;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--moment-line);
  border-radius: 20px;
  background: var(--moment-soft);
  color: var(--moment-text);
  text-align: left;
}

.night-create-options .night-create-night-card-option {
  border-color: transparent;
  background: var(--moment-purple);
  color: #fff;
}

.night-create-options .night-create-night-card-option small {
  color: rgba(255, 255, 255, .78);
}

.night-create-options .night-create-moment-option {
  border-color: transparent;
  background: #fff;
  color: #17161c;
}

.night-create-options .night-create-moment-option small {
  color: #777380;
}

.night-create-options button:hover,
.night-create-options button:focus-visible {
  border-color: var(--moment-purple);
  background: color-mix(in srgb, var(--moment-purple) 9%, var(--moment-surface));
  transform: none;
}

.night-create-options .night-create-night-card-option:hover,
.night-create-options .night-create-night-card-option:focus-visible {
  border-color: transparent;
  background: color-mix(in srgb, var(--moment-purple) 88%, #17161c);
}

.night-create-options .night-create-moment-option:hover,
.night-create-options .night-create-moment-option:focus-visible {
  border-color: var(--moment-purple);
  background: color-mix(in srgb, var(--moment-purple) 5%, #fff);
}

.night-create-options button span {
  margin-bottom: auto;
  font-size: 28px;
  line-height: 1;
}

.night-create-options button strong {
  font-size: 17px;
  line-height: 1.1;
}

.night-create-options button small {
  color: var(--moment-muted);
  font-size: 11px;
  line-height: 1.25;
}

.night-create-options .night-create-expiry-note {
  display: block;
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--moment-purple) 10%, var(--moment-surface));
  color: var(--moment-purple);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.4;
}

.night-create-options .night-create-night-card-option .night-create-expiry-note {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.night-create-options .night-create-moment-note {
  display: block;
  margin-top: 5px;
  color: inherit;
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
}

.moment-create form {
  display: grid;
  gap: 15px;
}

.moment-create form > label,
.moment-create fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--moment-text);
  font-size: 12px;
  font-weight: 800;
}

.moment-create form > label > small {
  color: var(--moment-muted);
  font-size: 10px;
  font-weight: 500;
}

.moment-create input:not([type="radio"]):not([type="file"]),
.moment-create textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--moment-line);
  border-radius: 13px;
  padding: 12px 13px;
  background: var(--moment-soft);
  color: var(--moment-text);
  font: inherit;
  font-weight: 500;
}

.moment-create textarea {
  min-height: 120px;
  resize: vertical;
}

.moment-create input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px dashed var(--moment-line);
  border-radius: 13px;
  background: var(--moment-soft);
  color: var(--moment-muted);
}

.moment-tag-editor {
  display: flex;
  min-height: 48px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--moment-line);
  border-radius: 13px;
  background: var(--moment-soft);
}

.moment-tag-list {
  display: contents;
}

.moment-tag-chip {
  position: relative;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 25px 0 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--moment-purple) 13%, var(--moment-surface));
  color: var(--moment-purple);
  font-size: 11px;
  font-weight: 800;
}

.moment-tag-chip button {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 2px solid var(--moment-soft);
  border-radius: 50%;
  background: var(--moment-purple);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.moment-create .moment-tag-editor input[data-moment-tag-input],
.moment-edit-form .moment-tag-editor input[data-moment-tag-input] {
  width: 150px;
  min-width: 110px;
  flex: 1;
  padding: 6px 2px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
}

.moment-tag-editor input[data-moment-tag-input][hidden] {
  display: none;
}

.moment-location-picker {
  position: relative;
  display: block;
}

.moment-location-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--moment-line);
  border-radius: 14px;
  background: var(--moment-surface);
  box-shadow: 0 16px 34px rgba(19,16,31,.18);
}

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

.moment-location-results button {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--moment-line);
  background: transparent;
  color: var(--moment-text);
  text-align: left;
}

.moment-location-results button:last-child {
  border-bottom: 0;
}

.moment-location-results button:hover,
.moment-location-results button:focus-visible {
  background: color-mix(in srgb, var(--moment-purple) 9%, var(--moment-surface));
}

.moment-location-results strong {
  font-size: 12px;
}

.moment-location-results small {
  overflow: hidden;
  color: var(--moment-muted);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-image-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

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

.moment-image-preview span {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  aspect-ratio: 1;
  background: var(--moment-soft);
  cursor: grab;
  transition: opacity .16s ease, transform .16s ease;
}

.moment-image-preview span.is-dragging {
  opacity: .5;
  transform: scale(.96);
}

.moment-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-create [data-moment-image-picker][hidden] {
  display: none;
}

.moment-image-preview button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(0,0,0,.58);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  opacity: .88;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.moment-image-preview button:hover,
.moment-image-preview button:focus-visible {
  background: rgba(104,76,255,.9);
  opacity: 1;
}

.moment-image-preview i {
  position: absolute;
  top: 7px;
  left: 7px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 15px;
  font-style: normal;
  line-height: 1;
  touch-action: none;
  backdrop-filter: blur(8px);
}

.moment-visibility {
  grid-template-columns: 1fr 1fr;
  padding: 0;
  border: 0;
}

.moment-visibility legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.moment-visibility label {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--moment-line);
  border-radius: 13px;
  background: var(--moment-soft);
}

.moment-visibility label:has(input:checked) {
  border-color: var(--moment-purple);
  background: color-mix(in srgb, var(--moment-purple) 9%, var(--moment-surface));
}

.moment-visibility input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--moment-purple);
}

.moment-visibility span {
  font-weight: 800;
}

.moment-visibility small {
  display: none;
}

.moment-create .primary {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
}

.moments-section {
  box-sizing: border-box;
  width: min(100%, 720px);
  margin: 18px auto 0;
  padding: 22px;
  border-radius: 22px;
  background: var(--moment-surface);
  color: var(--moment-text);
}

.night-mine-panel .moments-section {
  width: 100%;
  margin-top: 28px;
}

.moments-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.moments-section > header .eyebrow {
  margin: 0 0 3px;
  color: var(--moment-purple);
}

.moments-section > header h2 {
  margin: 0;
  color: var(--moment-text);
  font-size: 18px;
  line-height: 1.15;
}

.moments-section > header span {
  display: block;
  margin-top: 4px;
  color: var(--moment-muted);
  font-size: 11px;
}

.moments-section > header > button,
.moments-empty button,
.public-profile-view-more {
  min-height: 34px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--moment-purple) 12%, var(--moment-surface));
  color: var(--moment-purple);
  font-size: 11px;
  font-weight: 850;
}

.moments-feed {
  display: grid;
  gap: 18px;
}

.moment-card {
  overflow: hidden;
  border: 1px solid var(--moment-line);
  border-radius: 18px;
  background: var(--moment-surface);
}

.moment-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
}

.moment-card time,
.moment-visibility-state {
  color: var(--moment-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.moment-visibility-state.is-private {
  color: var(--moment-purple);
}

.moment-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  overflow: hidden;
  background: var(--moment-line);
}

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

.moment-images img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.moment-images-1 img {
  height: auto;
  max-height: 520px;
  aspect-ratio: 4 / 3;
}

.moment-images-3 img:first-child,
.moment-images-5 img:first-child {
  grid-row: span 2;
  height: 442px;
}

.moment-copy {
  padding: 16px;
}

.moment-copy h3 {
  margin: 0 0 8px;
  color: var(--moment-text);
  font-size: 17px;
  line-height: 1.2;
}

.moment-copy p {
  margin: 0;
  color: var(--moment-text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.moment-location {
  display: block;
  margin-top: 12px;
  color: var(--moment-muted);
  font-size: 10px;
}

.moment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.moment-tags span {
  color: var(--moment-purple);
  font-size: 11px;
  font-weight: 750;
}

.moments-empty {
  padding: 28px 18px;
  border: 1px dashed var(--moment-line);
  border-radius: 16px;
  text-align: center;
}

.moments-empty strong {
  color: var(--moment-text);
  font-size: 15px;
}

.moments-empty p {
  margin: 6px 0 14px;
  color: var(--moment-muted);
  font-size: 11px;
}

.public-profile-view-more {
  display: block;
  margin: 16px auto 0;
  width: fit-content;
  text-decoration: none;
}

.public-profile-view-more span {
  margin-left: 4px;
  opacity: .7;
}

.moments-profile-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.moments-profile-rail .moments-empty {
  grid-column: 1 / -1;
  width: 100%;
}

.moment-profile-card {
  display: grid;
  width: 100%;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--moment-text);
}

.moment-profile-card:hover,
.moment-profile-card:focus-visible {
  transform: translateY(-2px);
}

.moment-profile-cover {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--moment-purple) 26%, var(--moment-soft)), var(--moment-soft));
  background-position: center;
  background-size: cover;
  box-shadow: var(--moment-card-shadow);
}

.moment-profile-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.moment-profile-copy {
  display: grid;
  padding: 10px 2px 0;
  background: transparent;
}

.moment-profile-copy strong {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  color: var(--moment-text);
  font-size: 14px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.moment-profile-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 2px 0;
}

.moment-profile-author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--moment-muted);
  text-decoration: none;
}

.moment-profile-author img,
.moment-profile-author > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--moment-line);
  border-radius: 50%;
  background: var(--moment-soft);
  font-size: 9px;
  font-weight: 800;
  object-fit: cover;
}

.moment-profile-author [data-night-avatar-fallback][hidden] {
  display: none;
}

.moment-profile-author strong {
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-profile-like {
  display: inline-flex;
  min-width: 34px;
  height: 28px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--moment-muted);
}

.moment-profile-like.active {
  color: #f24b8f;
}

.moment-profile-like svg {
  width: 16px;
  height: 16px;
}

.moment-profile-like svg path {
  fill: currentColor;
}

.moment-profile-like b {
  color: currentColor;
  font-size: 10px;
  line-height: 1;
}

body.moment-route main.moment-detail-page {
  position: fixed;
  z-index: 205;
  inset: 48px 0 0;
  height: calc(100dvh - 48px);
  overflow: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #f5f5f7;
  color: #171715;
}

body.night-mode.moment-route main.moment-detail-page {
  background: #111114;
  color: #fff;
}

body.moment-route .moment-detail-sheet {
  width: 100%;
  max-width: none;
  min-height: 100%;
  max-height: none;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: #f5f5f7;
  box-shadow: none;
}

body.night-mode.moment-route .moment-detail-sheet {
  background: #111114;
}

body.moment-route .moment-detail-sheet .night-detail-layout {
  width: min(1080px, calc(100% - 48px));
  min-height: 100%;
  margin: 0 auto;
  padding: 42px 0;
  gap: 36px;
}

body.moment-route .moment-detail-media {
  min-width: 0;
}

body.moment-route .moment-detail-gallery,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-gallery,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-gallery {
  position: relative;
  top: 0;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  align-self: start;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--moment-soft);
  box-shadow: none;
  clip-path: inset(0 round 22px);
  isolation: isolate;
}

.moment-detail-gallery .moment-detail-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: inherit;
}

.moment-detail-gallery .moment-detail-gallery-track::-webkit-scrollbar {
  display: none;
}

.moment-detail-gallery figure {
  width: 100%;
  height: 100%;
  min-width: 100%;
  margin: 0;
  background: var(--moment-soft);
  scroll-snap-align: start;
}

body.moment-route .moment-detail-gallery figure img,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-gallery figure img,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-gallery figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.moment-gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: rgba(255,255,255,.58);
  color: rgba(23,22,28,.72);
  font-size: 27px;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .18s ease, background .18s ease;
  backdrop-filter: blur(10px);
}

.moment-gallery-arrow.is-previous {
  left: 14px;
}

.moment-gallery-arrow.is-next {
  right: 14px;
}

.moment-detail-gallery:hover .moment-gallery-arrow,
.moment-gallery-arrow:focus-visible {
  opacity: .82;
}

.moment-gallery-arrow:hover {
  background: rgba(255,255,255,.78);
  opacity: 1;
}

body.moment-route .moment-detail-copy,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-copy,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-copy {
  box-sizing: border-box;
  border-radius: 24px;
  background: #fff;
  color: var(--moment-text);
  box-shadow: 0 12px 34px rgba(22, 20, 30, .05);
}

body.night-mode.moment-route .night-card-detail-modal .moment-detail-copy {
  background: #1d1d1f;
}

body.moment-route .moment-detail-profile,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-profile,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-profile {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.moment-detail-profile .night-detail-author {
  display: flex;
  width: 100%;
  max-width: none;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.moment-detail-profile .night-detail-author-profile {
  display: flex;
  width: auto;
  max-width: none;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

body.moment-route .moment-detail-post,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-post,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-post {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.moment-detail-post h1 {
  margin: 0 0 12px;
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0;
}

body.moment-route .moment-detail-content,
body.day-mode.moment-route .night-card-detail-modal .moment-detail-content,
body.night-mode.moment-route .night-card-detail-modal .moment-detail-content {
  display: block;
  min-height: 0;
  margin: 0 0 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  white-space: pre-line;
}

.moment-detail-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--moment-muted);
  font-size: 12px;
  font-weight: 700;
}

.moment-detail-post .moment-tags {
  margin-top: 18px;
}

.moment-detail-post .moment-tags span {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.moment-comments {
  width: 100%;
  max-width: none;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--moment-line) 58%, transparent);
}

.moment-comment-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-bottom: 22px;
}

.moment-comment-form textarea {
  min-height: 46px;
  resize: vertical;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid var(--moment-line);
  border-radius: 14px;
  background: var(--moment-soft);
  color: var(--moment-text);
  font: inherit;
}

.moment-comment-form button {
  align-self: end;
  grid-column: 1;
  justify-self: start;
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-radius: 14px;
  background: var(--moment-purple);
  color: #fff;
  font-weight: 800;
}

.moment-comment-list {
  display: grid;
  gap: 10px;
}

.moment-comment {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  padding: 13px;
  border-radius: 15px;
  background: transparent;
}

.moment-comments .moment-comment.is-publisher {
  background: var(--moment-soft);
}

.moment-comment.is-deletable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.moment-comment.is-pressing {
  transform: scale(.995);
}

body.moment-route .moment-comments .moment-comment .comment-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #eeeeef;
  color: #5f5b68;
  font-size: 11px;
  font-weight: 900;
}

body.moment-route .moment-comments .moment-comment img.comment-avatar {
  display: block;
  object-fit: cover;
  background: transparent;
}

body.night-mode.moment-route .moment-comments .moment-comment .comment-avatar {
  background: #29292f;
  color: #f7f7fb;
}

.moment-comment header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.moment-comment header strong {
  font-size: 11px;
}

.moment-comment header small,
.moment-comment p,
.moment-comments-empty,
.moment-comments-note {
  color: var(--moment-muted);
  font-size: 10px;
}

.moment-comment p {
  margin: 5px 0 0;
  color: var(--moment-text);
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 720px) {
  body.moment-route main.moment-detail-page {
    overflow: hidden;
  }

  body.moment-route .moment-detail-sheet {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.moment-route .moment-detail-sheet .night-detail-layout {
    grid-template-columns: minmax(300px, .98fr) minmax(340px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    align-items: stretch;
  }

  body.moment-route .moment-detail-media {
    position: relative;
    display: flex;
    width: min(100%, calc((100dvh - 200px) * .8));
    height: auto;
    min-height: 0;
    align-self: start;
    flex-direction: column;
    overflow: visible;
  }

  body.moment-route .moment-detail-gallery {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  body.moment-route .moment-detail-copy {
    display: grid;
    align-content: start;
    gap: 28px;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 32px;
    border: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  body.moment-route .moment-detail-copy::-webkit-scrollbar {
    display: none;
  }

  .moment-gallery-arrow {
    display: grid;
  }

  .moment-owner-actions {
    flex: 0 0 auto;
  }
}

@media (min-width: 720px) and (max-width: 1024px) {
  body.moment-route .moment-detail-sheet .night-detail-layout {
    width: min(calc(100% - 44px), 980px);
    grid-template-columns: minmax(280px, .95fr) minmax(320px, 1fr);
    gap: 28px;
  }
}

body.moment-route .moment-detail-page .night-detail-checkin-block,
body.moment-route .moment-detail-page .night-detail-count,
body.moment-route .moment-detail-page .night-detail-action-bar {
  display: none;
}

.account-moments-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.account-moments-title > button {
  min-height: 34px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--moment-purple) 12%, var(--moment-surface));
  color: var(--moment-purple);
  font-size: 11px;
  font-weight: 850;
}

.account-moments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.account-moments-grid > .moments-empty {
  grid-column: 1 / -1;
}

.account-moment-card {
  position: relative;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-moment-visual {
  position: relative;
}

.account-moment-visual > a:first-child {
  display: block;
  overflow: hidden;
  border-radius: 17px;
  box-shadow: 0 6px 18px rgba(34, 28, 58, .12);
}

.account-moment-card .account-moment-title {
  display: block;
  margin: 10px 2px 0;
  color: var(--account-text);
  text-decoration: none;
}

.account-moment-visual .moment-visibility-state {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #00a808;
  text-shadow: 0 1px 5px rgba(255,255,255,.8);
  box-shadow: none;
  backdrop-filter: none;
}

.account-moment-visual .moment-visibility-state.is-private {
  color: #d43b46;
}

.account-moment-cover {
  display: block;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, rgba(104,76,255,.22), rgba(104,76,255,.04));
  background-position: center;
  background-size: cover;
}

.account-moment-card .account-moment-title strong {
  display: -webkit-box;
  min-height: 2.4em;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-moment-edit {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--luca-purple);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 9px;
  font-weight: 850;
  text-decoration: none;
}

.account-moment-edit svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-moment-edit span {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.account-moment-metrics {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0,0,0,.8);
}

.account-moment-metrics > span,
.account-moment-metrics > button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.account-moment-metrics svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.75));
}

.account-moment-metrics b {
  color: inherit;
  font-size: 10px;
  line-height: 1;
}

.account-moment-create-modal {
  position: fixed;
  z-index: 260;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.account-moment-create-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(12px);
}

.account-moment-create-sheet {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88dvh, 760px);
  overflow: hidden;
  border-radius: 24px;
  background: var(--account-card);
  color: var(--account-text);
}

.account-moment-create-sheet > .account-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--account-text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  opacity: 1;
}

.account-moment-create-sheet .moment-create {
  box-sizing: border-box;
  max-height: min(88dvh, 760px);
  overflow: auto;
  padding: 30px;
  scrollbar-width: none;
}

.account-moment-create-sheet .moment-create::-webkit-scrollbar {
  display: none;
}

.account-moment-create-sheet .moment-create .section-head {
  margin-bottom: 20px;
}

.account-moment-create-sheet .moment-create h2 {
  margin: 4px 0;
  color: var(--account-text);
}

.account-moment-create-sheet .moment-create .section-head > p:last-child {
  color: var(--account-muted);
  font-size: 12px;
}

.moment-owner-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
}

body.moment-route .moment-owner-actions button {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  place-content: center;
  min-width: 0;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #eeeeef;
  color: #6f6f76;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.moment-owner-actions button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

body.moment-route .moment-owner-actions button span {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  box-shadow: none;
  -webkit-text-fill-color: inherit;
}

body.moment-route .moment-owner-actions .night-visibility-toggle svg {
  width: 14px;
  height: 14px;
}

body.moment-route .moment-owner-actions button:first-child {
  background: #eeeeef;
  color: #6f6f76;
  -webkit-text-fill-color: #6f6f76;
}

body.moment-route .moment-owner-actions .night-visibility-toggle.is-public {
  background: rgba(0,255,9,.14);
  color: #008f2c;
}

body.moment-route .moment-owner-actions .night-visibility-toggle.is-public span {
  color: #008f2c;
  -webkit-text-fill-color: #008f2c;
}

body.moment-route .moment-owner-actions .night-visibility-toggle.is-hidden {
  background: #eeeeef;
  color: #6f6f76;
}

body.moment-route .moment-owner-actions .moment-delete-action {
  background: #ffe7ef;
  color: #ff2d55;
}

body.moment-route .night-card-detail-modal .night-detail-owner-actions .moment-delete-action,
body.day-mode.moment-route .night-card-detail-modal .night-detail-owner-actions .moment-delete-action,
body.night-mode.moment-route .night-card-detail-modal .night-detail-owner-actions .moment-delete-action {
  background: #ffe7ef;
  color: #ff2d55;
  -webkit-text-fill-color: #ff2d55;
}

.moment-edit-form {
  display: grid;
  gap: 13px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--moment-line);
}

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

.moment-edit-form label {
  display: grid;
  gap: 6px;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.moment-edit-form input:not([type="hidden"]),
.moment-edit-form textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--moment-line);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--moment-soft);
  color: var(--moment-text);
  font: inherit;
  font-weight: 500;
}

@media (max-width: 719px) {
  body.account-route .account-route-page .account-content-moments {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding-right: 16px;
    padding-left: 16px;
    overflow-x: clip;
  }

  body.my-night-route .night-action-sheet:has(.moment-create) {
    align-items: start;
    padding: calc(60px + env(safe-area-inset-top)) 14px 16px;
  }

  body.my-night-route .night-action-sheet .night-checkin-sheet:has(.moment-create) {
    max-height: calc(100dvh - 76px - env(safe-area-inset-top));
  }

  .night-action-sheet .night-create-chooser {
    padding: 0;
  }

  .night-action-sheet .moment-create {
    padding: 24px 18px 28px;
  }

  .night-action-sheet .moment-create .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding-right: 42px;
  }

  .night-action-sheet .moment-create .section-head > * {
    max-width: 100%;
    min-width: 0;
  }

  .night-create-options {
    grid-template-columns: 1fr;
  }

  .night-create-options button {
    min-height: 112px;
  }

  .night-create-options .night-create-night-card-option,
  .night-create-options .night-create-moment-option {
    min-height: 112px;
  }

  .moments-section {
    width: 100%;
    padding: 17px;
    border-radius: 18px;
  }

  .moments-profile-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .moment-profile-card {
    width: 100%;
    min-width: 0;
  }

  body.moment-route main.moment-detail-page {
    inset: calc(52px + env(safe-area-inset-top)) 0 0;
    height: calc(100dvh - 52px - env(safe-area-inset-top));
  }

  body.moment-route .moment-detail-sheet .night-detail-layout {
    display: block;
    width: calc(100% - 24px);
    margin: 0 auto;
    padding: 12px 0 28px;
  }

  body.moment-route .moment-detail-gallery {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  body.moment-route .moment-detail-copy,
  body.day-mode.moment-route .night-card-detail-modal .moment-detail-copy,
  body.night-mode.moment-route .night-card-detail-modal .moment-detail-copy {
    width: 100%;
    margin: 12px 0 0;
    padding: 24px 19px 42px;
  }

  .moment-detail-post {
    padding: 32px 0;
  }

  .moment-owner-actions {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .moment-detail-post h1 {
    font-size: 15px;
  }

  .account-moments-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .account-moments-title {
    align-items: center;
  }

  .account-moment-create-modal {
    padding: 14px;
  }

  .account-moment-create-sheet .moment-create {
    padding: 24px 18px 28px;
  }

  .moments-section > header {
    align-items: center;
  }

  .moment-images img {
    height: 160px;
  }

  .moment-images-3 img:first-child,
  .moment-images-5 img:first-child {
    height: 322px;
  }
}
