/* Owners' dashboard (/manage/). Loaded after project.css; shares its tokens and .btn / .eyebrow / .display / .prose. */

.m-body {
  background: var(--linen);
}

.m-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar ---------------------------------------------------------------- */

.m-side {
  position: sticky;
  top: 0;
  height: 100vh;
  /* A nav taller than the window (a short laptop screen, the staff links) scrolls here, so "Sign out" is
     always reachable. */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 237, 225, 0.25) transparent;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
  background: var(--ink);
  color: var(--linen);
}

.m-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  color: var(--linen);
}

.m-brand:hover {
  color: var(--linen);
}

.m-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.m-brand__word {
  font-family: var(--font-display);
  font-size: 20px;
}

.m-brand__sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
}

.m-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-nav__group {
  margin: 14px 8px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
}

.m-nav__link {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--linen);
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.m-nav__link:hover {
  background: rgba(244, 237, 225, 0.08);
  color: var(--linen);
}

.m-nav__link--on {
  background: rgba(244, 237, 225, 0.14);
}

.m-nav__link--quiet {
  color: var(--muted-on-ink);
  font-weight: 500;
}

.m-side__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line-on-ink);
}

/* Main column ------------------------------------------------------------ */

.m-main {
  padding: 36px 44px 96px;
  max-width: 1120px;
  width: 100%;
}

.m-head {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.m-head .eyebrow a {
  color: inherit;
}

.m-head__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.m-lede {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 16px;
}

.m-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.m-message {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 15px;
}

.m-message--success {
  background: #e3f1f0;
  border-color: transparent;
  color: #17504f;
}

.m-message--error {
  background: #fbe7e2;
  border-color: transparent;
  color: #8a2f1c;
}

.m-message--warning {
  background: #fbf1dc;
  border-color: transparent;
  color: #6b4a12;
}

/* Sections, cards, panels ----------------------------------------------- */

.m-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.m-section--notes {
  background: transparent;
  border-color: transparent;
  padding-inline: 4px;
}

.m-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.m-section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 14px;
}

.m-section__head .m-section__title {
  margin-bottom: 4px;
}

.m-section__blurb {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 62ch;
}

.m-section__meta {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 6px;
}

.m-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.m-cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.m-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.m-card:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.m-card--flat {
  padding: 20px 22px;
  gap: 8px;
}

.m-card__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--sand);
}

.m-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-card__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  color: var(--muted);
}

.m-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
}

.m-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.m-card__meta {
  font-size: 13px;
  color: var(--muted);
}

.m-card__foot {
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.m-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m-panel__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.m-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.m-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--linen-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.m-pill--ok {
  background: #e3f1f0;
  color: #17504f;
}

.m-pill--warn {
  background: #fde9dd;
  color: #8a3a1c;
}

.m-notes {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.m-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.m-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.m-link--danger {
  color: #8a2f1c;
}

.m-danger {
  margin-top: 8px;
  padding: 0 4px;
}

/* Photo grid --------------------------------------------------------------- */

.m-photos {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.m-grid:empty {
  display: none;
}

.m-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: var(--linen);
  border: 1px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

/* Reordering: the pressed tile shrinks a touch while the hold counts down, then a copy of it (the ghost)
   follows the pointer while its slot stays behind as a faint outline. */
.m-tile--arming {
  transform: scale(0.96);
  border-color: var(--ink);
}

.m-tile--placeholder {
  opacity: 0.3;
  border: 1px dashed var(--ink);
}

.m-tile--ghost {
  position: fixed;
  z-index: 1000;
  margin: 0;
  pointer-events: none;
  transition: none;
  transform-origin: center;
  will-change: transform;
  background: var(--linen);
  border-color: var(--ink);
  box-shadow: 0 22px 44px rgba(15, 42, 60, 0.35), 0 4px 10px rgba(15, 42, 60, 0.18);
}

html.m-sorting,
html.m-sorting * {
  cursor: grabbing !important;
}

html.m-sorting {
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

.m-tile--uploading .m-tile__actions,
.m-tile--uploading .m-tile__caption {
  visibility: hidden;
}

.m-tile--error {
  border-color: #c4482f;
}

.m-tile__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand);
  cursor: grab;
  touch-action: pan-y; /* the page still scrolls with a flick; a hold-then-drag is ours */
  user-select: none;
  -webkit-user-select: none;
}

.m-tile__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-touch-callout: none; /* no "Save image" sheet on a long press */
  -webkit-user-drag: none;
}

.m-tile__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--linen);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: none;
}

.m-tile--cover .m-tile__badge {
  display: inline-flex;
}

.m-tile__handle {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: rgba(15, 42, 60, 0.55);
  color: var(--linen);
  font-size: 13px;
  letter-spacing: -2px;
  cursor: grab;
}

.m-tile__progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(244, 237, 225, 0.5);
  overflow: hidden;
}

.m-tile__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lagoon);
  transition: width 0.2s ease;
}

.m-tile__caption {
  display: block;
}

.m-tile__caption input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 13px;
  outline: none;
}

.m-tile__caption input:focus {
  border-color: var(--ink);
}

.m-tile__caption input[data-saved="1"] {
  border-color: var(--lagoon);
}

.m-tile__actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.m-tile__btn {
  min-height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.m-tile__btn:hover {
  border-color: var(--ink);
}

.m-tile__btn--cover {
  margin-left: auto;
  white-space: nowrap;
  gap: 4px;
}

.m-tile--cover .m-tile__btn--cover {
  display: none;
}

.m-photos[data-has-cover="0"] .m-tile__btn--cover {
  display: none;
}

.m-tile__btn--danger {
  color: #8a2f1c;
}

.m-tile__btn--danger:hover {
  border-color: #c4482f;
}

.m-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.m-drop:hover,
.m-drop--active {
  background: var(--linen);
  border-color: var(--ink);
}

.m-drop__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--linen);
  font-size: 20px;
}

/* Forms -------------------------------------------------------------------- */

.m-form {
  display: flex;
  flex-direction: column;
}

.m-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.m-fields--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.m-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.m-field--wide {
  grid-column: 1 / -1;
}

.m-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-field input,
.m-field select,
.m-field textarea {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  font-size: 15px;
  width: 100%;
  outline: none;
}

.m-field input:disabled {
  background: var(--linen-2);
  color: var(--muted);
}

.m-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.m-field input:focus,
.m-field select:focus,
.m-field textarea:focus {
  border-color: var(--ink);
}

.m-field--error input,
.m-field--error textarea,
.m-field--error select {
  border-color: #c4482f;
}

.m-help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.m-error {
  font-size: 13px;
  color: #8a2f1c;
  font-weight: 600;
}

.m-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--white);
}

.m-check:has(input:checked) {
  border-color: var(--ink);
}

.m-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  flex: none;
}

.m-check__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.m-check__label {
  font-size: 14px;
  font-weight: 700;
}

.m-audience .m-check {
  margin: 14px 0 12px;
}

/* Under Meta's housing category the ages are Meta's (18–65+), so the age band hides while the box is ticked. */
.m-audience:has(input[name="housing"]:checked) .m-ages {
  display: none;
}

.m-savebar {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--linen);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.m-savebar--dirty,
.m-savebar--static {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.m-savebar--static {
  position: static;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  padding: 0;
}

.m-savebar__text {
  font-size: 14px;
  font-weight: 600;
}

.m-savebar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.m-savebar .btn--outline {
  border-color: var(--linen);
  color: var(--linen);
}

.m-savebar .btn--ink {
  background: var(--linen);
  color: var(--ink);
}

.m-savebar .btn--ink:hover {
  background: var(--white);
  color: var(--ink);
}

.m-savebar--static .btn--outline {
  border-color: var(--ink);
  color: var(--ink);
}

.m-savebar--static .btn--ink {
  background: var(--ink);
  color: var(--linen);
}

/* Journal editor ----------------------------------------------------------- */

.m-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.m-editor__main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.m-editor__main .m-field input[name="title"] {
  font-family: var(--font-display);
  font-size: 26px;
  min-height: 56px;
}

.m-editor__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
}

.m-md__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.m-md__tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.m-md__tab--on {
  background: var(--ink);
  color: var(--linen);
}

.m-md__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.m-md__pane {
  display: none;
}

.m-md__pane--on {
  display: block;
}

.m-md__pane--write textarea {
  min-height: 520px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.m-md__pane--preview {
  min-height: 520px;
  padding: 8px 4px;
}

.m-cover {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-cover__media {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand);
}

.m-cover__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-cover__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

/* Lists -------------------------------------------------------------------- */

.m-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.m-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.m-list__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.m-list__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
}

.m-list__thumb {
  flex: none;
  width: 84px;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sand);
}

.m-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-list__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.m-list__title {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.15;
}

.m-list__meta {
  font-size: 13px;
  color: var(--muted);
}

.m-list__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.m-list__link {
  font-size: 13px;
  font-weight: 700;
}

/* Toast -------------------------------------------------------------------- */

.m-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--linen);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  max-width: calc(100vw - 32px);
}

.m-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.m-toast--error {
  background: #8a2f1c;
}

/* Sign-in card (allauth entrance layout) ----------------------------------- */

.m-entrance {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--linen);
}

.m-entrance__card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow);
}

.m-entrance__card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.05;
  margin: 0;
}

.m-entrance__card p {
  font-size: 15px;
  color: var(--ink-2);
}

.m-entrance__card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m-entrance__foot {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.m-entrance__foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .m-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-side {
    position: static;
    height: auto;
    overflow: visible;
    padding: 12px 12px 10px;
    gap: 8px;
  }

  .m-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .m-nav__group {
    display: none;
  }

  .m-nav__link {
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 14px;
  }

  .m-side__foot {
    flex-direction: row;
    justify-content: space-between;
    padding-top: 8px;
    margin-top: 0;
  }

  .m-side__foot form {
    display: inline;
  }

  .m-main {
    padding: 22px 16px 80px;
  }

  .m-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-editor__side {
    position: static;
  }

  .m-fields--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .m-cards--2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-list__item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .m-fields,
  .m-fields--3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .m-tile {
    padding: 6px;
  }

  .m-tile__btn {
    padding: 0 7px;
  }

  .m-tile__btn-text {
    display: none;
  }

  .m-section {
    padding: 18px 16px;
  }

  .m-savebar {
    flex-direction: column;
    align-items: stretch;
    bottom: 8px;
  }

  .m-savebar__actions .btn {
    flex: 1;
  }
}

/* Guest reviews ----------------------------------------------------------- */

.m-panel--form {
  max-width: 860px;
  gap: 20px;
}

.m-list__quote {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-stars {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--sunset);
  margin-left: 6px;
  vertical-align: 2px;
}

/* Pricing studio ------------------------------------------------------------ */

.m-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
}

.m-studio__controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.m-studio__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-studio__rate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.m-studio__big {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.m-studio__big::after {
  content: " / night";
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

.m-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

.m-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sand-2), var(--sand));
}

.m-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sand-2), var(--sand));
}

.m-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--hibiscus);
  border: 3px solid var(--white);
  box-shadow: 0 4px 14px rgba(196, 72, 47, 0.35);
}

.m-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hibiscus);
  border: 3px solid var(--white);
  box-shadow: 0 4px 14px rgba(196, 72, 47, 0.35);
}

.m-range:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}

.m-range__ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}

.m-studio__stay {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.m-studio__control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.m-seg__btn,
.m-seg__input {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.m-seg__btn--on {
  background: var(--ink);
  color: var(--linen);
}

.m-seg__input {
  width: 74px;
  border-right: 0;
  cursor: text;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.m-seg__input::-webkit-outer-spin-button,
.m-seg__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.m-seg__input:focus {
  background: var(--linen);
}

.m-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.m-stepper__btn {
  width: 40px;
  min-height: 40px;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
}

.m-stepper__btn:hover {
  background: var(--linen);
}

.m-stepper__value {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.m-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.m-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--linen);
}

.m-stat--net {
  background: var(--ink);
  color: var(--linen);
}

.m-stat__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-stat--net .m-stat__label {
  color: var(--muted-on-ink);
}

.m-stat__value {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.m-stat__sub {
  font-size: 13px;
  color: var(--muted);
}

.m-stat--net .m-stat__sub {
  color: var(--muted-on-ink);
}

.m-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--linen-2);
}

.m-bar__seg {
  display: block;
  height: 100%;
  transition: width 0.15s ease;
}

.m-bar__seg--net,
.m-legend__swatch--net {
  background: var(--lagoon);
}

.m-bar__seg--charges,
.m-legend__swatch--charges {
  background: var(--sand-2);
}

.m-bar__seg--card,
.m-legend__swatch--card {
  background: var(--peach);
}

.m-bar__seg--tax,
.m-legend__swatch--tax {
  background: var(--ink-2);
}

.m-legend {
  list-style: none;
  margin: -12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--ink-2);
}

.m-legend output {
  font-weight: 700;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.m-legend__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 7px;
  vertical-align: -1px;
}

.m-studio__ledger {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 18px 14px;
  background: var(--white);
}

.m-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.m-ledger th,
.m-ledger td {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  vertical-align: baseline;
}

.m-ledger tr:first-child th,
.m-ledger tr:first-child td {
  border-top: 0;
}

.m-ledger th {
  text-align: left;
  font-weight: 400;
  color: var(--ink-2);
  padding-right: 12px;
}

.m-ledger td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.m-ledger__total th,
.m-ledger__total td {
  font-weight: 700;
  color: var(--ink);
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}

.m-ledger__total--net td {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--lagoon);
}

.m-ledger__owner th {
  padding-left: 18px;
  font-size: 13px;
}

.m-ledger__owner td {
  font-size: 13px;
}

.m-ledger__neg {
  color: var(--hibiscus);
}

.m-ledger__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  vertical-align: 1px;
}

.m-studio__foot {
  margin: 12px 0 0;
}

/* Village charges ------------------------------------------------------------ */

.m-charges__head,
.m-charges__row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px minmax(0, 1.2fr) minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: start;
}

.m-charges__head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 8px;
}

.m-charges__row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.m-charges__row[hidden] {
  display: none;
}

.m-charges__cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.m-charges__cell input,
.m-charges__cell select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  font-size: 15px;
  width: 100%;
  outline: none;
}

.m-charges__cell input:focus,
.m-charges__cell select:focus {
  border-color: var(--ink);
}

.m-charges__cell.m-field--error input,
.m-charges__cell.m-field--error select {
  border-color: #c4482f;
}

.m-charges__cell--remove {
  align-items: flex-end;
  padding-top: 5px;
}

.m-charges__delete {
  display: none;
}

.m-charges__empty {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 12px;
}

.m-charges .m-row {
  margin-top: 12px;
}

/* Owners & split ------------------------------------------------------------- */

.m-owners {
  display: flex;
  flex-direction: column;
}

.m-owners__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.m-owners__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.m-owners__row--total {
  border-top: 2px solid var(--ink);
  font-weight: 700;
}

.m-owners__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.m-owners__name {
  font-weight: 700;
}

.m-owners__mail {
  font-size: 13px;
  color: var(--muted);
}

.m-owners__pct {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.m-owners__pct input {
  width: 96px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 15px;
  text-align: right;
  outline: none;
}

.m-owners__pct input:focus {
  border-color: var(--ink);
}

.m-owners__pct.m-field--error input {
  border-color: #c4482f;
}

.m-owners__pct--text {
  font-weight: 700;
}

.m-owners__unit {
  color: var(--muted);
}

.m-owners__total--ok {
  color: var(--lagoon);
}

.m-owners__total--off {
  color: var(--hibiscus);
}

@media (max-width: 900px) {
  .m-studio {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .m-charges__head {
    display: none;
  }

  .m-charges__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .m-charges__cell::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .m-charges__cell--remove::before {
    content: none;
  }

  .m-charges__cell--remove {
    grid-column: 2;
    grid-row: 1;
  }

  .m-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-studio__big {
    font-size: 36px;
  }
}

/* Earnings ------------------------------------------------------------------- */

.m-stats--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.m-stats--4 .m-stat__value {
  font-size: 30px;
}

.m-stat--mine {
  background: var(--sand);
}

.m-yearpick select {
  min-height: 48px;
  padding: 0 40px 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%230f2a3c' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.m-tablewrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.m-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.m-table th,
.m-table td {
  padding: 10px 10px 10px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.m-table thead th {
  border-top: 0;
  padding-top: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.m-table tfoot th,
.m-table tfoot td {
  border-top: 2px solid var(--ink);
  font-weight: 700;
}

.m-table__num {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.m-table__neg {
  color: var(--ink-2);
}

.m-table__net {
  font-weight: 700;
  color: var(--lagoon);
}

.m-table__title {
  display: block;
  font-weight: 700;
}

.m-table__sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.m-table__sub a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-table__me td {
  background: var(--linen);
}

.m-table--compact td,
.m-table--compact th {
  padding-block: 8px;
}

.m-card--money {
  background: var(--ink);
  color: var(--linen);
}

.m-card--money .m-card__meta,
.m-card--money .m-card__foot {
  color: var(--muted-on-ink);
}

a.m-card--money:hover {
  color: var(--linen);
}

@media (max-width: 900px) {
  .m-stats--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .m-stats--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-head__actions {
    flex-wrap: wrap;
  }
}

/* Questions (Ask the owners) ----------------------------------------------- */

.m-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--hibiscus, #c4482f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.m-question__reply {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Discounts ---------------------------------------------------------------------------------------------- */

.m-code {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--linen-2);
  border: 1px solid var(--line);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}

.m-offer .m-list__title .m-pill {
  margin-left: 6px;
  vertical-align: 2px;
}

.m-offer__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
}

.m-offer__preview s {
  color: var(--muted);
  text-decoration-color: #c4482f;
}

.m-offer .m-list__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.m-choices {
  margin: 0;
  padding: 0;
  border: 0;
}

.m-choices legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-choices__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.m-choice:has(input:checked) {
  border-color: var(--ink);
}

.m-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

/* The welcome photo: pick one of Dickenson Bay's photos from the island map */
.m-pick {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.m-pick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.m-pick__grid form {
  margin: 0;
}

.m-pick__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--linen-2);
  cursor: pointer;
}

.m-pick__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.m-pick__label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 42, 60, 0.85);
  color: var(--linen);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.m-pick__item:hover,
.m-pick__item:focus-visible {
  border-color: var(--ink);
}

.m-pick__item:hover .m-pick__label,
.m-pick__item:focus-visible .m-pick__label {
  opacity: 1;
}

.m-offer .m-list__title .m-pill {
  font-family: var(--font-body);
}

@media (max-width: 640px) {
  .m-offer {
    flex-direction: column;
    align-items: stretch;
  }

  .m-offer .m-list__side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Promotions: the on/off switch, and an offer that's switched off -------------------------------------- */

.m-switch-form {
  margin: 0;
}

.m-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.m-switch__track {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--sand-2);
  transition: background 0.18s ease;
}

.m-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(15, 42, 60, 0.3);
  transition: transform 0.18s ease;
}

.m-switch--on {
  color: var(--ink);
}

.m-switch--on .m-switch__track {
  background: var(--lagoon);
}

.m-switch--on .m-switch__thumb {
  transform: translateX(18px);
}

.m-switch:focus-visible .m-switch__track {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.m-switch__label {
  min-width: 2em;
  text-align: left;
}

.m-offer--off .m-list__title,
.m-offer--off .m-offer__preview {
  color: var(--muted);
}

.m-offer .m-list__side .m-pill {
  align-self: flex-end;
}

@media (prefers-reduced-motion: reduce) {
  .m-switch__track,
  .m-switch__thumb {
    transition: none;
  }
}

/* The overview's promotions panel */
.m-promos {
  display: flex;
  flex-direction: column;
}

.m-promo {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.m-promo:first-child {
  border-top: 0;
  padding-top: 0;
}

.m-promo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.m-promo__name {
  font-weight: 700;
  color: var(--ink);
}

.m-promo__meta {
  font-size: 13px;
  color: var(--muted);
}

/* Facebook ads ------------------------------------------------------------------------------------------ */

.m-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.m-facts > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
}

.m-facts dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-facts dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.m-facts dd .m-help {
  display: block;
  margin-top: 2px;
}

.m-facts code,
.m-message code,
.m-help code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.m-panel--quiet {
  background: transparent;
}

/* Make an ad: the steps */
.m-adnew {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.m-adstep {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.m-adstep__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
}

.m-adstep__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--linen);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
}

.m-adstep__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
}

.m-adstep .m-field input[type="text"],
.m-adstep .m-field input[type="number"] {
  max-width: 100%;
}

/* Tiles you pick one of: the homes, the photos */
.m-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.m-tiles--photos {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.m-tiles--small {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.m-tile-pick {
  position: relative;
  display: block;
  cursor: pointer;
}

.m-tile-pick[hidden] {
  display: none;
}

.m-tile-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m-tile-pick__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 8px 8px 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.m-tile-pick__card img,
.m-tile-pick__art {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sand);
}

.m-tile-pick__art {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
}

.m-tile-pick__card b {
  font-size: 15px;
  line-height: 1.25;
}

.m-tile-pick__card small {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.m-tile-pick__card--text {
  justify-content: center;
  min-height: 90px;
  padding: 12px;
  background: var(--linen);
}

.m-tiles--small .m-tile-pick__card {
  padding: 4px;
}

.m-tiles--small .m-tile-pick__card--text {
  min-height: 0;
  align-items: center;
  text-align: center;
  font-size: 13px;
}

.m-tile-pick:hover .m-tile-pick__card {
  border-color: var(--line-strong);
}

.m-tile-pick input:checked + .m-tile-pick__card {
  border-color: var(--lagoon);
  box-shadow: 0 0 0 3px rgba(31, 122, 120, 0.18);
}

.m-tile-pick input:focus-visible + .m-tile-pick__card {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Chips: one of (radio) or several of (checkbox) */
.m-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.m-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m-chip > span {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 40px;
  padding: 6px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.m-chip > span small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.m-chip:hover > span {
  border-color: var(--ink);
}

.m-chip input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--linen);
}

.m-chip input:checked + span small {
  color: var(--muted-on-ink);
}

.m-chip input:focus-visible + span {
  outline: 2px solid var(--lagoon);
  outline-offset: 2px;
}

.m-chipbtn {
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.m-chipbtn:hover {
  border-color: var(--ink);
}

.m-row--tweaks {
  margin-top: -4px;
}

/* Options: a list to pick one from (the offer) */
.m-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.m-option:has(input:checked) {
  border-color: var(--lagoon);
  background: #f2f8f7;
}

.m-option input {
  margin-top: 4px;
  accent-color: var(--lagoon);
}

.m-option small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.m-option.is-off {
  opacity: 0.45;
  cursor: not-allowed;
}

.m-adtotal {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.m-adbar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--linen);
  box-shadow: var(--shadow-lg);
}

.m-adbar p {
  margin: 0;
  font-size: 14px;
  min-width: 0;
}

.m-adbar .btn--ink {
  background: var(--hibiscus);
  color: var(--white);
}

.m-adbar .btn--ink:hover {
  background: #b03f28;
}

/* An ad's page: the phone preview beside everything else */
.m-adreview {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.m-adreview__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.m-phone {
  position: sticky;
  top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #1c1e21;
}

.m-phone__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
}

.m-phone__avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--linen);
}

.m-phone__avatar--mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.m-phone__who {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.m-phone__who b {
  font-size: 15px;
}

.m-phone__who small {
  font-size: 12px;
  color: #65676b;
}

.m-phone__text {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 15px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.m-phone__media {
  background: #f0f2f5;
}

.m-phone__media img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.m-phone__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f0f2f5;
}

.m-phone__link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.3;
}

.m-phone__link small {
  font-size: 12px;
  color: #65676b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-phone__link b {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.m-phone__btn {
  flex: none;
  padding: 8px 14px;
  border-radius: 6px;
  background: #e4e6eb;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.m-phone__foot {
  margin: 0;
  padding: 10px 14px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* The one next thing to do */
.m-adstatus {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sand-2);
  border-radius: 16px;
  background: var(--white);
}

.m-adstatus h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
}

.m-adstatus p {
  margin: 0;
  color: var(--ink-2);
}

.m-adstatus--live {
  border-left-color: var(--lagoon);
}

.m-adstatus--bad {
  border-left-color: var(--hibiscus);
}

.m-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sand-2);
}

.m-dot--live {
  background: var(--lagoon);
  box-shadow: 0 0 0 4px rgba(31, 122, 120, 0.18);
}

.m-dot--bad {
  background: var(--hibiscus);
}

/* Checks */
.m-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.m-checks b {
  display: block;
  font-size: 15px;
}

.m-checks small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.m-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background: var(--linen-2);
  color: var(--ink-2);
}

.m-mark--ok {
  background: #e3f1f0;
  color: #17504f;
}

.m-mark--no {
  background: #fde9dd;
  color: #8a3a1c;
}

@media (max-width: 960px) {
  .m-adreview {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-phone {
    position: static;
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .m-facts > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-adbar {
    border-radius: 18px;
  }

  .m-adbar .btn {
    width: 100%;
  }

  .m-stats--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-tile-pick__card,
  .m-chip > span {
    transition: none;
  }
}

.m-adreview input[type="file"],
.m-adstep input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: 14px;
}

@media (max-width: 640px) {
  .m-offer .m-list__side {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 12px;
  }
}

@media (max-width: 640px) {
  .m-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .m-tiles--small {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .m-adstep {
    padding: 18px 16px;
  }

  .m-adbar {
    gap: 8px;
    padding: 10px 12px;
  }

  .m-adbar p {
    flex: 1 1 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .m-adbar .btn {
    min-height: 44px;
  }
}

/* Calendar (manage.js §8) ---------------------------------------------------------
   One colour per kind of block, used by the day cells, the swatches in the lists and the legend. */

.m-message--warning {
  background: #fde9dd;
  border-color: transparent;
  color: #8a3a1c;
}

.m-alert {
  border-color: rgba(196, 72, 47, 0.45);
  background: #fff8f6;
}

.m-cal[hidden],
.m-cal-legend[hidden],
.m-cal-detail[hidden],
.m-cal-warn[hidden] {
  display: none;
}

.m-cal-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.m-cal-tabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.m-cal-tabs .m-seg__btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 700;
}

.m-cal-tabs .m-seg__btn:last-child {
  border-right: 0;
}

.m-cal-tabs .m-seg__btn:hover {
  color: var(--ink);
  background: var(--linen);
}

.m-cal-tabs .m-seg__btn--on,
.m-cal-tabs .m-seg__btn--on:hover {
  color: var(--linen);
  background: var(--ink);
}

.m-cal {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-cal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-cal__nav {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.m-cal__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.m-cal__today {
  margin-left: 4px;
}

.m-cal__months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.m-cal__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.m-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 4px;
}

.m-cal__dow {
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@container (max-width: 620px) {
  .m-cal__months {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-cal__month--second {
    display: none;
  }
}

/* A day cell is the night that starts that day. A block colours its nights; its check-out morning gets a stub on
   the left, the way a portal draws arrival → departure; the cell after a selection's last night is its check-out. */
.m-day {
  --out: transparent;
  position: relative;
  min-width: 0;
  height: 54px;
  padding: 5px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.m-day:hover {
  outline: 2px solid var(--line-strong);
  outline-offset: -2px;
}

.m-day:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 1;
}

.m-day--blank {
  visibility: hidden;
  pointer-events: none;
}

.m-day__num {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.m-day__tag {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.m-day--past {
  opacity: 0.5;
}

.m-day--today .m-day__num {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.m-day--first {
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
}

.m-day--last {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}

.m-day--out {
  padding-left: 13px;
}

.m-day--out::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  border-radius: 0 7px 7px 0;
  background: var(--out);
}

.m-day--direct,
.m-swatch--direct {
  background: var(--lagoon);
  color: var(--white);
}

.m-day--hold,
.m-swatch--hold {
  background: #d7e9e8 repeating-linear-gradient(135deg, rgba(31, 122, 120, 0.2) 0 3px, transparent 3px 7px);
  color: #17504f;
}

.m-day--resort,
.m-swatch--resort {
  background: var(--peach);
  color: var(--ink);
}

.m-day--owner,
.m-swatch--owner {
  background: var(--sand-2);
  color: var(--ink);
}

.m-day--manual,
.m-swatch--manual {
  background: repeating-linear-gradient(135deg, rgba(15, 42, 60, 0.2) 0 4px, rgba(15, 42, 60, 0.06) 4px 8px);
  color: var(--ink-2);
}

.m-day--airbnb,
.m-day--vrbo,
.m-swatch--airbnb,
.m-swatch--vrbo {
  background: #dfe5ea;
  color: var(--ink);
}

.m-day--out-direct {
  --out: var(--lagoon);
}

.m-day--out-hold {
  --out: #b9dcda;
}

.m-day--out-resort {
  --out: var(--peach);
}

.m-day--out-owner {
  --out: var(--sand-2);
}

.m-day--out-manual {
  --out: rgba(15, 42, 60, 0.16);
}

.m-day--out-airbnb,
.m-day--out-vrbo {
  --out: #dfe5ea;
}

.m-day--clash {
  box-shadow: inset 0 0 0 2px var(--hibiscus);
}

.m-day__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hibiscus);
}

/* The selection: the first night and the check-out day solid ink, a band between them (dashed while it's only a
   preview under the pointer), so it never reads as one of the block colours. */
.m-day--in::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: rgba(15, 42, 60, 0.1);
  pointer-events: none;
}

.m-day--preview::after {
  border-top-style: dashed;
  border-bottom-style: dashed;
  background: rgba(15, 42, 60, 0.05);
}

.m-day.m-day--start,
.m-day.m-day--end {
  background: var(--ink);
  color: var(--linen);
}

.m-day.m-day--start {
  border-radius: 9px 0 0 9px;
}

.m-day.m-day--end {
  border-radius: 0 9px 9px 0;
}

.m-day.m-day--start.m-day--end {
  border-radius: 9px;
}

.m-day--start .m-day__tag,
.m-day--end .m-day__tag {
  display: none;
}

.m-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.m-cal-legend > span {
  display: inline-flex;
  align-items: center;
}

.m-swatch {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border-radius: 3px;
  vertical-align: -1px;
}

.m-swatch--lg {
  width: 14px;
  height: 36px;
  margin-right: 0;
  border-radius: 4px;
}

.m-swatch--clash {
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--hibiscus);
}

.m-cal-detail {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--linen);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.m-cal-detail__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.m-cal-detail__item .m-swatch {
  width: 14px;
  height: 14px;
  margin: 5px 0 0;
}

.m-cal-detail__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.m-cal-detail__title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.15;
}

.m-cal-detail__meta {
  font-size: 14px;
  color: var(--ink-2);
}

.m-cal-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 4px;
}

.m-cal-detail__actions form {
  margin: 0;
}

.m-cal-form {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.m-cal-form__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-margin-top: 16px;
}

.m-cal-form__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
}

.m-reason {
  flex: 1 1 210px;
  align-items: flex-start;
}

.m-reason input {
  margin-top: 2px;
}

.m-reason__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-reason__label {
  display: inline-flex;
  align-items: center;
}

.m-reason__line {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.m-choice__state {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.m-choice__state--taken {
  color: #8a3a1c;
  font-weight: 700;
}

.m-cal-warn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--linen-2);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}

.m-cal-warn--clash {
  background: #fbe7e2;
  color: #8a2f1c;
}

.m-ticked {
  margin-top: 14px;
}

/* Antigua Village: each home's sign-in at the owner portal, above the list of bookings to block or free ---- */

.m-village {
  margin-bottom: 18px;
}

.m-village .m-list__title .m-pill {
  margin-left: 8px;
  vertical-align: 2px;
}

.m-village__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
}

.m-village__side form {
  margin: 0;
}

.m-village__code {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-village__box {
  width: 7.5em;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--sand-2);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* under 16px, iOS zooms the page when the box is tapped */
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.m-village__box:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.m-village__said {
  margin: 14px 0 16px;
}

.m-village__trouble {
  color: #8a3a1c;
}

@media (max-width: 640px) {
  .m-village__side {
    justify-content: flex-start;
  }
}

.m-todo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fde9dd;
  color: #8a3a1c;
  font-size: 15px;
}

.m-todo-strip a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-ticked summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .m-day {
    height: 50px;
    padding: 4px 4px;
  }

  .m-day__tag {
    font-size: 9.5px;
  }

  .m-cal-form__title {
    font-size: 21px;
  }
}

/* A day on the bay ----------------------------------------------------------- */

/* A section that is a link to a page of its own (Site photos → A day on the bay). */
.m-section--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.m-section--link:hover {
  border-color: var(--ink);
  color: inherit;
}

.m-section--link .m-section__head {
  margin-bottom: 0;
}

.m-section--link .m-section__title,
.m-section--link .m-section__blurb {
  display: block;
}

/* How it looks: the home page's band at the dashboard's width. */
.m-story-look {
  padding: 0;
  overflow: hidden;
}

.m-story-look__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 16px 22px 14px;
}

.m-story-preview {
  --gutter: 26px;
  padding: 30px var(--gutter) 34px;
}

.m-story-preview__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.m-story-preview .section-head {
  gap: 24px;
}

.m-story-preview .display--lg {
  font-size: clamp(28px, 3vw, 40px);
}

.m-story-preview .lede {
  font-size: 15px;
  max-width: 340px;
}

.m-story-preview .day__time {
  font-size: 22px;
}

.m-story-preview .day__text {
  font-size: 13px;
}

.m-story-preview [hidden] {
  display: none !important;
}

/* The empty slot: the site shows the six it ships with until there are photos here. */
.m-story-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--linen);
  font-size: 15px;
  color: var(--ink-2);
}

.m-story-empty[hidden] {
  display: none;
}

.m-story-empty p {
  margin: 0;
  max-width: 60ch;
}

.m-story {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* The moments, morning to night. The home page shows the first six (SitePhoto.SLOTS["day"]["shows"]); the rest
   wait in reserve below a label. Numbers and the label follow the order live, drags included (CSS counters). */
.m-story__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: moment;
}

.m-story__list:empty {
  display: none;
}

.m-moment {
  counter-increment: moment;
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: var(--linen);
  border: 1px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.m-moment__media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand);
  cursor: grab;
  touch-action: pan-y; /* a flick still scrolls the page; a hold-then-drag reorders */
  user-select: none;
  -webkit-user-select: none;
}

.m-moment__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.m-moment__media img:not([src]),
.m-moment__media img[src=""] {
  visibility: hidden;
}

.m-moment__media--drop {
  outline: 3px solid var(--lagoon);
  outline-offset: -3px;
}

.m-moment__badge {
  position: absolute;
  top: 7px;
  left: 7px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--linen);
  font-size: 12px;
  font-weight: 700;
}

.m-moment__badge::before {
  content: counter(moment);
}

.m-moment__swap {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 42, 60, 0.74);
  color: var(--linen);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.m-moment__swap:hover,
.m-moment__swap:focus-within {
  background: var(--ink);
}

.m-moment__swap:focus-within {
  outline: 2px solid var(--linen);
  outline-offset: -4px;
}

.m-moment .m-tile__progress {
  bottom: 44px;
}

.m-moment__fields {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px 16px;
  min-width: 0;
}

.m-moment__when {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-moment__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.m-moment__field--alt {
  grid-column: 1 / -1;
}

.m-moment__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-moment__opt {
  font-weight: 500;
  color: var(--muted);
}

.m-moment input[type="text"],
.m-moment textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--white);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.m-moment textarea {
  height: 88px;
  resize: none;
  line-height: 1.4;
}

.m-moment input[type="text"]:focus,
.m-moment textarea:focus {
  border-color: var(--ink);
}

.m-moment input[type="text"]:disabled {
  background: var(--linen-2);
  color: var(--muted);
}

.m-moment [data-flash="1"] {
  border-color: var(--lagoon);
}

.m-moment__sunset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.m-moment__sunset:has(input:checked) {
  border-color: var(--sunset);
  background: #fdf0e9;
}

.m-moment__sunset input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sunset);
}

.m-moment__tonight {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.m-moment__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.m-moment__actions [data-delete] {
  margin-top: auto;
}

.m-moment__actions .m-tile__btn:disabled {
  opacity: 0.35;
  cursor: default;
  border-color: var(--line);
}

.m-moment__saved {
  min-height: 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--lagoon);
  writing-mode: horizontal-tb;
}

.m-moment--busy .m-moment__fields,
.m-moment--busy .m-moment__actions,
.m-moment--busy .m-moment__swap {
  opacity: 0.45;
  pointer-events: none;
}

.m-moment.m-tile--error {
  border-color: #c4482f;
}

.m-tile--ghost .m-moment__badge,
.m-tile--ghost.m-moment::before {
  visibility: hidden;
}

/* Past the sixth: kept, not shown. */
.m-story__list > .m-moment:nth-child(n + 7) {
  background: transparent;
  border: 1px dashed var(--line-strong);
}

.m-story__list > .m-moment:nth-child(n + 7) .m-moment__media img {
  opacity: 0.6;
}

.m-story__list > .m-moment:nth-child(n + 7) .m-moment__badge {
  background: var(--sand-2);
  color: var(--ink);
}

.m-story__list > .m-moment:nth-child(n + 7) .m-moment__badge::before {
  content: "Reserve";
}

.m-story__list > .m-moment:nth-child(7) {
  margin-top: 34px;
}

.m-story__list > .m-moment:nth-child(7)::before {
  content: "In reserve: not on the site until you drag one up";
  position: absolute;
  top: -27px;
  left: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  .m-moment__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-moment__when {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .m-moment__when .m-moment__field {
    width: 120px;
  }

  .m-moment__field--alt {
    grid-column: auto;
  }

  .m-moment textarea {
    height: 66px;
  }
}

@media (max-width: 640px) {
  .m-story-preview {
    --gutter: 16px;
    padding-block: 24px 26px;
  }

  .m-story-head {
    flex-direction: column;
    gap: 2px;
  }

  .m-story-head .m-section__meta {
    padding-top: 0;
  }

  .m-moment__swap-more {
    display: none;
  }

  .m-story-look__bar {
    padding: 14px 16px 12px;
  }

  .m-moment {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .m-moment__fields {
    display: contents;
  }

  .m-moment__when {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .m-moment__when .m-moment__field {
    width: auto;
  }

  .m-moment__field--line,
  .m-moment__field--alt {
    grid-column: 1 / -1;
  }

  .m-moment__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    height: auto;
  }

  .m-moment__actions [data-delete] {
    margin: 0 0 0 auto;
  }

}

/* Insights (Marketing → Insights) --------------------------------------------- */

.m-insights__pair {
  margin-bottom: 0;
}

.m-insights__pair > .m-section {
  margin-bottom: 18px;
}

.m-insights__foot {
  max-width: 78ch;
  margin-top: 6px;
}

.m-insights__posts a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* what the numbers suggest */

.m-advice__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.m-advice__item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--linen);
}

.m-advice__item--good {
  background: #e3f1f0;
}

.m-advice__item--note {
  background: transparent;
  border: 1px dashed var(--line-strong);
}

.m-advice__kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.m-advice__item--ad .m-advice__kind {
  color: var(--hibiscus-ink);
}

.m-advice__item--demand .m-advice__kind {
  color: var(--lagoon);
}

.m-advice__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-advice__title {
  font-size: 16px;
}

.m-advice__detail {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* the day-by-day chart */

.m-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 180px;
  padding-top: 8px;
}

.m-chart__col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.m-chart__bars {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.m-chart__bar {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--ink);
  opacity: 0.85;
}

.m-chart__col:hover .m-chart__bar {
  opacity: 1;
}

.m-chart__dot {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--lagoon);
  box-shadow: 0 0 0 2px var(--white);
}

.m-chart__spend {
  display: block;
  width: 100%;
  height: 0;
  margin-top: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--peach);
}

.m-chart__label {
  height: 16px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  visibility: hidden;
}

.m-chart__label--on {
  visibility: visible;
}

.m-chart__legend {
  margin-top: 10px;
}

.m-chart__swatch--visits {
  background: var(--ink);
}

.m-chart__swatch--searches {
  background: var(--lagoon);
}

.m-chart__swatch--spend {
  background: var(--peach);
}

/* devices */

.m-insights__devices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.m-bar__seg--phone,
.m-legend__swatch.m-bar__seg--phone {
  background: var(--ink);
}

.m-bar__seg--tablet,
.m-legend__swatch.m-bar__seg--tablet {
  background: var(--lagoon);
}

.m-bar__seg--desktop,
.m-legend__swatch.m-bar__seg--desktop {
  background: var(--sand-2);
}

.m-bar__seg--unknown,
.m-legend__swatch.m-bar__seg--unknown {
  background: var(--linen-2);
}

/* how far they get, and the months */

.m-reach {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.m-reach__row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.m-reach__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-reach__track {
  position: relative;
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--linen-2);
  overflow: hidden;
}

.m-reach__fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  border-radius: 6px;
  background: var(--lagoon);
}

.m-reach--months .m-reach__fill {
  background: var(--sea);
}

.m-reach--months .m-reach__name {
  white-space: normal;
}

.m-reach__fill--taken,
.m-reach--months .m-reach__fill--taken {
  background: var(--ink);
}

.m-reach__pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.m-reach__taken {
  font-size: 12px;
  color: var(--muted);
}

.m-reach__tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--linen-2);
  color: var(--ink-2);
  vertical-align: middle;
}

.m-insights__stays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 10px;
}

.m-shares {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-2);
  display: grid;
  gap: 3px;
}

.m-shares strong {
  color: var(--ink);
}

/* the photos they open */

.m-opened {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.m-opened__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.m-opened__figure {
  position: relative;
  margin: 0 0 4px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--linen-2);
}

.m-opened__figure img,
.m-opened__blank {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-opened__cover {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--linen);
  color: var(--ink);
}

.m-opened__count {
  font-weight: 700;
}

.m-opened__caption {
  color: var(--ink-2);
}

.m-opened__group {
  font-size: 12px;
  color: var(--muted);
}

/* the ads table */

.m-insights__ads td,
.m-insights__ads th {
  white-space: nowrap;
}

.m-insights__ads td:first-child {
  white-space: normal;
  min-width: 200px;
}

/* an ad's own page: day by day, and who saw it */

.m-adaudience {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.m-adaudience__title {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.m-adaudience .m-reach__row {
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) 84px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .m-advice__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .m-chart {
    height: 140px;
    gap: 2px;
  }

  .m-insights__stays {
    grid-template-columns: minmax(0, 1fr);
  }

  .m-reach__row {
    grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) 64px;
  }
}
