/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/plyr-5aa44fbe.css");
@import url("/assets/filepond-32df7b65.css");
@import url("/assets/filepond-plugin-image-preview-7ef2a7e9.css");
@import url("/assets/heritage-vault-c0b71804.css");

/* Inter — self-hosted variable font */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/InterVariable-884c49a1.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/InterVariable-Italic-0aa7a4b3.woff2") format("woff2");
}

/* Native app text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}


/* Plyr video player light theme */
.plyr {
  --plyr-color-main: rgb(29 155 240);
  /* blue-500 / X blue */
  --plyr-video-background: rgb(0 0 0);
  --plyr-menu-background: white;
  --plyr-menu-color: rgb(15 23 42);
}

.plyr--video {
  border-radius: 0.75rem;
  overflow: hidden;
}

.attachment__video {
  width: 100%;
  max-width: 100%;
}

/* Lexxy mentions option styling */
.lexxy-mention-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 8px;
  background: transparent;
}

.lexxy-mention-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgb(29 155 240);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  object-fit: cover;
}

.lexxy-mention-text {
  min-width: 0;
  line-height: 1.1;
}

.lexxy-mention-name {
  margin: 0;
  color: rgb(15 23 42);
  font-weight: 600;
  font-size: 0.9rem;
}

.lexxy-mention-handle {
  margin: 0;
  color: rgb(100 116 139);
  font-size: 0.75rem;
}

/* Theme-aligned selects */
select {
  background: white;
  color: rgb(15 23 42);
  border: 1px solid rgb(209 213 219);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

select:focus {
  outline: 2px solid rgb(29 155 240);
  outline-offset: 2px;
}

select option {
  background: white;
  color: rgb(15 23 42);
}

/* Lexxy prompt cleanup */
lexxy-prompt,
lexxy-prompt * {
  list-style: none !important;
}

lexxy-prompt [role="listbox"],
lexxy-prompt ul,
lexxy-prompt menu {
  margin: 0 !important;
  padding: 6px !important;
  background: white !important;
  border: 1px solid rgb(229 231 235) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  position: absolute !important;
  inset-inline-start: 0 !important;
  max-inline-size: min(360px, 95vw) !important;
  overflow: visible !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
}

/* WebKit scrollbar refinement */
lexxy-prompt [role="listbox"]::-webkit-scrollbar,
lexxy-prompt ul::-webkit-scrollbar,
lexxy-prompt menu::-webkit-scrollbar {
  width: 6px;
}

lexxy-prompt [role="listbox"]::-webkit-scrollbar-track,
lexxy-prompt ul::-webkit-scrollbar-track,
lexxy-prompt menu::-webkit-scrollbar-track {
  background: transparent;
}

lexxy-prompt [role="listbox"]::-webkit-scrollbar-thumb,
lexxy-prompt ul::-webkit-scrollbar-thumb,
lexxy-prompt menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
}

lexxy-prompt [role="listbox"]::-webkit-scrollbar-thumb:hover,
lexxy-prompt ul::-webkit-scrollbar-thumb:hover,
lexxy-prompt menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

:where(.lexxy-prompt-menu) {
  background: white !important;
  border: 1px solid rgb(229 231 235) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.lexxy-prompt-menu.lexxy-prompt-menu--visible {
  list-style-type: none !important;
  list-style-position: none !important;
  padding-inline-start: 0 !important;
  margin-inline-start: 0 !important;
  padding: 0 !important;
}

lexxy-prompt menu>*,
lexxy-prompt [role="listbox"]>* {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

lexxy-prompt-item,
lexxy-prompt-item * {
  background: transparent !important;
  list-style: none !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Prompt options: full width, theme-aligned selection */
lexxy-prompt li,
lexxy-prompt [role="option"],
lexxy-prompt menu>*,
lexxy-prompt [role="listbox"]>* {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  display: block !important;
  border-radius: 0.65rem;
  background: transparent !important;
  border: 0 !important;
}

:where(lexxy-prompt) ul,
:where(lexxy-prompt) ol,
:where(lexxy-prompt) li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

lexxy-prompt [role="option"][aria-selected="true"],
lexxy-prompt li[aria-selected="true"] {
  background: rgb(219 239 253) !important;
  border: 1px solid rgb(142 205 248) !important;
}

:where(.lexxy-prompt-menu__item)[aria-selected] {
  background-color: rgb(219 239 253) !important;
  border: 1px solid rgb(142 205 248) !important;
}

:where(.lexxy-prompt-menu__item):hover {
  background-color: rgb(243 244 246) !important;
}

.hashtag-link {
  color: rgb(29 155 240);
  font-weight: 600;
  text-decoration: none;
}

.hashtag-link:hover {
  color: rgb(26 140 216);
  text-decoration: underline;
}

.tale-search-highlight {
  background: rgb(254 240 138);
  color: rgb(17 24 39);
  border-radius: 0.2rem;
  padding: 0 0.14rem;
}

.lexxy-hashtag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: rgb(239 246 255);
  color: rgb(29 155 240);
  border: 1px solid rgb(191 219 254);
  font-weight: 600;
  font-size: 0.95em;
}

.lexxy-hashtag-chip::before {
  content: "#";
  color: rgb(29 155 240);
}

/* Hashtags in editor */
.lexxy-hashtag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background: rgb(239 246 255);
  color: rgb(29 155 240);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lexxy-hashtag:hover {
  background: rgb(219 234 254);
  color: rgb(26 140 216);
}

/* Prevent UI button labels from breaking into multiple lines on narrow screens. */
a.inline-flex,
button.inline-flex,
.button_to>button,
.button_to>input[type="submit"],
.button_to>input[type="button"],
input[type="submit"].inline-flex {
  white-space: nowrap;
}

/* Ensure prompt menus don't inherit list styles from lexxy-content */
lexxy-prompt :where(.lexxy-content) ul,
lexxy-prompt :where(.lexxy-content) ol {
  list-style-type: none !important;
  list-style-position: outside !important;
  padding-inline-start: 0 !important;
  margin-inline-start: 0 !important;
}

lexxy-prompt :where(.lexxy-content) li {
  list-style: none !important;
  margin-block: 0 !important;
  padding-inline-start: 0 !important;
}

lexxy-prompt,
lexxy-editor {
  overflow: visible !important;
}

/* Remove markers/bullets and align items */
lexxy-prompt li::marker {
  content: "" !important;
  display: none !important;
}

lexxy-prompt li>*,
lexxy-prompt [role="option"]>* {
  width: 100% !important;
  display: block !important;
}

/* Lexxy content — match site font and scale headings for compact layout */
.lexxy-content {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lexxy-content h1 {
  font-size: 1.25em;
}

.lexxy-content h2 {
  font-size: 1.125em;
}

.lexxy-content h3 {
  font-size: 1em;
}

.lexxy-content h4,
.lexxy-content h5,
.lexxy-content h6 {
  font-size: 1em;
}

.lexxy-content p,
.lexxy-content ul,
.lexxy-content ol,
.lexxy-content blockquote {
  margin-block: 0 0.3em;
}

.lexxy-content> :last-child {
  margin-block-end: 0;
}

.lexxy-content a {
  color: rgb(29 155 240);
  text-decoration: none;
}

.lexxy-content a:hover {
  text-decoration: underline;
}

.lexxy-content ul,
.lexxy-content ol {
  padding-left: 1.25em;
}

.lexxy-content ul {
  list-style-type: disc;
}

.lexxy-content ol {
  list-style-type: decimal;
}

.lexxy-content blockquote {
  border-left: 2px solid rgb(209 213 219);
  padding-left: 0.65em;
  color: rgb(107 114 128);
}

.lexxy-content img {
  max-width: 100%;
  border-radius: 0.75rem;
}

.lexxy-content hr {
  border: none;
  border-top: 1px solid rgb(229 231 235);
  margin: 0.6em 0;
}

.lexxy-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.4em 0;
  font-size: 0.9em;
}

.lexxy-content th,
.lexxy-content td {
  border: 1px solid var(--lexxy-color-table-cell-border, rgb(226 232 240));
  padding: 0.4em 0.65em;
  text-align: left;
  vertical-align: top;
}

.lexxy-content th {
  background-color: var(--lexxy-color-table-header-bg, rgb(241 245 249));
  font-weight: 600;
}

/* Lexxy editor base — consistent font for all editor instances */
lexxy-editor {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.lexxy-editor__content {
  font-size: 0.875rem;
  line-height: 1.5;
}

.lexxy-editor__content action-text-attachment {
  margin: 0 !important;
}

.tale-content action-text-attachment {
  display: block;
  margin: 0.35rem 0 !important;
}

/* Mentions should flow inline with text, unlike media/file attachments.
   inline-flex + vertical-align:middle ensures image-avatar and initials-avatar
   variants align identically (baseline differs between replaced <img> and
   text-containing <span>, but middle uses geometric center which is the same). */
.tale-content action-text-attachment[content-type="application/vnd.actiontext.mention"] {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  vertical-align: middle;
}

/* Tale content sizing tuned for tighter timeline density */
.tale-content {
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Reset browser default yellow background on <mark> elements.
   Lexxy uses <mark> for text color/highlight; inline styles set the
   actual color and background-color when intended. */
.tale-content mark {
  background-color: transparent;
  color: inherit;
}

.tale-content>* {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}

.tale-content>*:first-child {
  margin-top: 0;
}

.tale-content>*:last-child {
  margin-bottom: 0;
}

.tale-content p {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}

.tale-content p:first-child {
  margin-top: 0;
}

.tale-content p:last-child {
  margin-bottom: 0;
}

.tale-content a:not(.hashtag-link) {
  color: rgb(29 155 240);
}

.tale-content a:not(.hashtag-link):hover {
  text-decoration: underline;
}

.tale-content ul,
.tale-content ol {
  padding-left: 1.15em;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}

.tale-content ul {
  list-style-type: disc;
}

.tale-content ol {
  list-style-type: decimal;
}

.tale-content blockquote {
  border-left: 2px solid rgb(209 213 219);
  padding-left: 0.65em;
  color: rgb(107 114 128);
}

/* Code blocks — use Lexxy variables for consistent theming */
.tale-content code,
.tale-content pre {
  background-color: var(--lexxy-color-ink-lightest, rgb(241 245 249));
  border-radius: var(--lexxy-radius, 0.5ch);
  color: var(--lexxy-color-ink, rgb(15 23 42));
  font-family: var(--lexxy-font-mono, ui-monospace, Menlo, Monaco, Consolas, monospace);
  font-size: 0.9em;
  padding: 0.25ch 0.5ch;
}

.tale-content pre,
.tale-content code[data-language] {
  display: block;
  hyphens: none;
  margin-top: 0.35em;
  margin-bottom: 0.35em;
  overflow-x: auto;
  padding: 1ch;
  tab-size: 2;
  text-wrap: nowrap;
  white-space: pre;
  word-break: break-word;
}

.tale-content .code-token__attr,
.tale-content .token.keyword {
  color: var(--lexxy-color-code-token-att, #d73a49);
}

.tale-content .code-token__property,
.tale-content .token.number,
.tale-content .token.tag {
  color: var(--lexxy-color-code-token-property, #005cc5);
}

.tale-content .code-token__selector,
.tale-content .token.string {
  color: var(--lexxy-color-code-token-selector, #22863a);
}

.tale-content .code-token__comment,
.tale-content .token.comment {
  color: var(--lexxy-color-code-token-comment, #6a737d);
  font-style: italic;
}

.tale-content .code-token__operator,
.tale-content .token.operator {
  color: var(--lexxy-color-code-token-operator, #d73a49);
}

.tale-content .code-token__function,
.tale-content .token.function {
  color: var(--lexxy-color-code-token-function, #6f42c1);
}

.tale-content .code-token__variable,
.tale-content .token.variable {
  color: var(--lexxy-color-code-token-variable, #e36209);
}

.tale-content .code-token__punctuation,
.tale-content .token.punctuation {
  color: var(--lexxy-color-code-token-punctuation, #24292e);
}

.tale-content img,
.tale-content .attachment__image {
  max-width: 100%;
  border-radius: 0.85rem;
  border: 1px solid rgb(229 231 235);
}

.tale-content action-text-attachment[content-type="application/vnd.actiontext.mention"] img {
  border: none;
  border-radius: 9999px;
  max-width: none;
}

:where(.lexxy-content) {
  img {
    min-block-size: unset;
  }
}

.tale-content .attachment,
.tale-content figure {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
}

.tale-content .attachment__caption {
  color: rgb(107 114 128);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* File attachment link styling */
.tale-content .attachment--file .attachment__name a {
  color: rgb(29 155 240);
  text-decoration: none;
}

.tale-content .attachment--file .attachment__name a:hover {
  text-decoration: underline;
}

.tale-content .attachment--file .attachment__icon {
  text-decoration: none;
  cursor: pointer;
}

.tale-content hr {
  border: none;
  border-top: 1px solid rgb(229 231 235);
  margin: 0.5em 0;
}

.tale-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.35em 0;
  font-size: 0.9em;
}

.tale-content th,
.tale-content td {
  border: 1px solid var(--lexxy-color-table-cell-border, rgb(226 232 240));
  padding: 0.35em 0.6em;
  text-align: left;
  vertical-align: top;
}

.tale-content th {
  background-color: var(--lexxy-color-table-header-bg, rgb(241 245 249));
  font-weight: 600;
}

@media (max-width: 767px) {
  .tale-content {
    font-size: 15px;
    line-height: 1.5;
  }
}

/* Tale expand — gradient fade on clamped long content */
.tale-content--clamped {
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Image Gallery — Facebook-style mosaic grid */
.attachment-gallery {
  display: grid;
  gap: 3px;
  border-radius: 0.85rem;
  overflow: hidden;
  margin: 0.35em 0;
}

.attachment-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

.attachment-gallery action-text-attachment,
.attachment-gallery .attachment,
.attachment-gallery figure {
  margin: 0 !important;
  display: block;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.attachment-gallery .attachment__caption {
  display: none;
}

/* 2 images — side by side */
.attachment-gallery--2 {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 2 / 1;
}

/* 3 images — large left + 2 stacked right */
.attachment-gallery--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 4 / 3;
}

.attachment-gallery--3> :first-child {
  grid-row: 1 / 3;
}

/* 4 images — 2×2 grid */
.attachment-gallery--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
}

/* 5+ images — 2×2 with overlay on 4th */
.attachment-gallery--5 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
}

.attachment-gallery__overlay-cell {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.attachment-gallery__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 1;
}

/* Standalone images (not in gallery) — clickable */
.tale-content > action-text-attachment img,
.tale-content > p > action-text-attachment img,
.lexxy-content > action-text-attachment img,
.lexxy-content > p > action-text-attachment img {
  cursor: pointer;
}

/* Gallery Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.gallery-lightbox__image {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  color: white;
  opacity: 0.8;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  transition: opacity 150ms;
}

.gallery-lightbox__close:hover {
  opacity: 1;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: white;
  opacity: 0.7;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 9999px;
  padding: 0.5rem;
  transition: opacity 150ms, background 150ms;
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__prev {
  left: 1rem;
}

.gallery-lightbox__next {
  right: 1rem;
}

.gallery-lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
}

/* Dialog theme — light */
.app-dialog {
  border-radius: 1rem;
  border: 1px solid rgb(209 213 219);
  background: white;
  color: rgb(15 23 42);
  padding: 0;
  width: min(90vw, 26rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  max-height: 90vh;
  overflow-y: auto;
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.app-dialog:not(.app-dialog--sheet) {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.app-dialog .dialog-close {
  cursor: pointer;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.25rem;
  color: inherit;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-dialog .dialog-close:hover {
  background-color: rgb(243 244 246);
  color: rgb(15 23 42);
}

.app-dialog--sheet {
  width: 100vw;
  max-width: 24rem;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .app-dialog--sheet {
    margin-left: auto;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
  }
}

.app-dialog.app-dialog--tale-edit {
  width: 45rem;
  max-width: 90vw;
  padding: 0.5rem;
  overflow: visible;
}

.app-dialog.app-dialog--engagers {
  width: 22rem;
  max-width: 90vw;
  padding: 0;
}

/* FullCalendar light theme overrides */
.fc {
  --fc-border-color: rgb(229 231 235);
  --fc-today-bg-color: rgb(239 246 255);
  --fc-button-bg-color: rgb(29 155 240);
  --fc-button-border-color: rgb(29 155 240);
  --fc-button-hover-bg-color: rgb(26 140 216);
  --fc-button-hover-border-color: rgb(26 140 216);
  --fc-button-active-bg-color: rgb(21 120 190);
  --fc-button-active-border-color: rgb(21 120 190);
  --fc-event-bg-color: rgb(29 155 240);
  --fc-event-border-color: rgb(29 155 240);
  --fc-page-bg-color: white;
  --fc-neutral-bg-color: rgb(249 250 251);
  font-size: 13px;
}

.fc .fc-toolbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgb(17 24 39);
}

.fc .fc-button {
  border-radius: 9999px !important;
  font-size: 12px;
  font-weight: 600;
  padding: 0.3em 0.85em;
}

.fc .fc-button-group>.fc-button {
  border-radius: 0 !important;
}

.fc .fc-button-group>.fc-button:first-child {
  border-top-left-radius: 9999px !important;
  border-bottom-left-radius: 9999px !important;
}

.fc .fc-button-group>.fc-button:last-child {
  border-top-right-radius: 9999px !important;
  border-bottom-right-radius: 9999px !important;
}

.fc .fc-col-header-cell-cushion {
  font-size: 11px;
  font-weight: 600;
  color: rgb(107 114 128);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fc .fc-daygrid-day-number {
  font-size: 12px;
  font-weight: 500;
  color: rgb(55 65 81);
  padding: 4px 6px;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: rgb(29 155 240);
  color: white;
  border-radius: 9999px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.fc .fc-daygrid-event {
  border-radius: 4px;
  font-size: 11px;
  padding: 1px 4px;
}

.fc .fc-daygrid-day:hover {
  cursor: pointer;
}

.fc th {
  border: none !important;
}

.fc .fc-scrollgrid {
  border-radius: 0.75rem;
  overflow: hidden;
}

/* FullCalendar timeGrid (week/day) views */
.fc .fc-timegrid-slot-label-cushion {
  font-size: 11px;
  font-weight: 500;
  color: rgb(107 114 128);
}

.fc .fc-timegrid-now-indicator-line {
  border-color: rgb(29 155 240);
  border-width: 2px;
}

.fc .fc-timegrid-now-indicator-arrow {
  border-top-color: rgb(29 155 240);
  border-bottom-color: rgb(29 155 240);
}

.fc .fc-timegrid-event {
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 4px;
}

.fc .fc-timegrid-event .fc-event-title {
  font-weight: 600;
}

.fc .fc-timegrid-event .fc-event-time {
  font-size: 10px;
  opacity: 0.85;
}

.fc .fc-timegrid-slot-lane:hover {
  background: rgb(249 250 251);
  cursor: pointer;
}

.fc .fc-timegrid-allday {
  background: rgb(249 250 251);
}

.fc .fc-timegrid-axis-cushion {
  font-size: 10px;
  font-weight: 600;
  color: rgb(156 163 175);
  text-transform: uppercase;
}

/* Sidebar scroll — hide scrollbar until hovered (X/Twitter style) */
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-scroll:hover {
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
}

.sidebar-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

/* PWA install banner */
.pwa-install-banner {
  margin: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgb(229 231 235);
  background: white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  position: relative;
}

.pwa-install-banner[data-visible] {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .pwa-install-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    top: auto;
    margin: 0;
    max-width: 380px;
    transform: translateY(8px);
  }

  .pwa-install-banner[data-visible] {
    transform: translateY(0);
  }
}

/* More panel — floating overlay on desktop sidebar */
.more-panel-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.more-panel-overlay[data-open] {
  opacity: 1;
}

.more-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.more-panel-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.5rem;
  transform: translateX(-12px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  overflow-y: auto;
}

.more-panel-overlay[data-open] .more-panel-content {
  transform: translateX(0) scale(1);
  opacity: 1;
}

/* Tribe form refresh */
.tribe-form-page {
  max-width: 72rem;
  padding: 1rem 0.75rem 1.5rem;
}

@media (min-width: 640px) {
  .tribe-form-page {
    padding-inline: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.75rem;
  }
}

.tribe-upload-card {
  box-shadow: inset 0 0 0 1px rgba(229, 231, 235, 0.85);
}

.tribe-upload-card .filepond--root {
  margin: 0;
  font-family: inherit;
}

.tribe-upload-card .filepond--panel-root {
  background: white;
  border: 1px dashed rgb(191 219 254);
  border-radius: 0.95rem;
  box-shadow: none;
}

.tribe-upload-card .filepond--drop-label {
  color: rgb(71 85 105);
  min-height: 8.5rem;
}

.tribe-upload-card .filepond--drop-label label {
  font-size: 0.86rem;
  line-height: 1.35;
}

.tribe-upload-card .filepond--label-action {
  color: rgb(37 99 235);
  font-weight: 700;
  text-decoration: none;
}

.tribe-upload-card .filepond--drip {
  background: rgba(147, 197, 253, 0.35);
}

.tribe-upload-card .filepond--item-panel {
  background: rgb(239 246 255);
}

.tribe-upload-card .filepond--file-action-button {
  color: rgb(15 23 42);
}

.tribe-gallery-grid .button_to {
  margin: 0;
}

@media (max-width: 640px) {

  .tribe-form-page .tribe-form-actions a,
  .tribe-form-page .tribe-form-actions input[type="submit"] {
    width: 100%;
  }
}

/* Notification Activity Pulse animation */
@keyframes notification-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(1.15);
  }

  100% {
    opacity: 0.6;
    transform: scale(1);
  }
}

.animate-notification-pulse {
  animation: notification-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Badge pop-in animation for lazy-loaded nav badges */
@keyframes badge-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.badge-pop {
  animation: badge-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Notification dropdown scrollbar */
[data-notification-bell-target="list"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

[data-notification-bell-target="list"]::-webkit-scrollbar {
  width: 5px;
}

[data-notification-bell-target="list"]::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
}

/* Line clamp for notification body text */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Line clamp for embedded tale content */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Engagement bar buttons */
.engagement-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  transition: background-color 150ms;
}

.engagement-btn:hover {
  background-color: rgb(239 246 255);
  /* blue-50 */
}

/* Details open chevron rotation */
details[open] .details-open\:rotate-180 {
  transform: rotate(180deg);
}

/* Like button uses button_to which wraps in a form */
.engagement-btn.group {
  border: none;
  background: none;
  cursor: pointer;
}

/* Pagy pagination on profile pages */
.pagy.series-nav {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 0;
}

.pagy.series-nav a,
.pagy.series-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(107 114 128);
  transition: background-color 150ms, color 150ms;
}

.pagy.series-nav a:hover {
  background-color: rgb(243 244 246);
  color: rgb(17 24 39);
}

.pagy.series-nav a.current,
.pagy.series-nav span.current {
  background-color: rgb(29 155 240);
  color: white;
}

/* Brand wordmark: mixed-case source text rendered at uniform cap-height */
.brand-wordmark {
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  letter-spacing: 0.06em;
}

@supports not (font-variant-caps: all-small-caps) {
  .brand-wordmark {
    text-transform: uppercase;
  }
}

/* Mobile bottom sheet dialog */
.mobile-bottom-sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  background: white;
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
  animation: slide-up 200ms ease-out;
}

.mobile-bottom-sheet::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Turbo stream insertion animation */
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

/* Task progress slider — transparent track, visible thumb */
.task-progress-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 1rem;
  margin: 0;
}

.task-progress-slider::-webkit-slider-runnable-track {
  background: transparent;
  height: 0.5rem;
  border-radius: 9999px;
}

.task-progress-slider::-moz-range-track {
  background: transparent;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
}

.task-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  background: white;
  border: 2px solid rgb(59 130 246);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  margin-top: -0.1875rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-progress-slider::-moz-range-thumb {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  background: white;
  border: 2px solid rgb(59 130 246);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-progress-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.task-progress-slider:hover::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.task-progress-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  border-color: rgb(37 99 235);
}

.task-progress-slider:active::-moz-range-thumb {
  transform: scale(1.3);
  border-color: rgb(37 99 235);
}

/* ============================================
   PWA / Mobile UX enhancements
   ============================================ */

/* Loading screen (standalone PWA launch) */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-screen.hidden {
  display: none;
}

.loading-screen-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.loading-screen-logo {
  object-fit: contain;
}

.loading-screen-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  margin: 0;
}

.loading-screen-spinner {
  position: absolute;
  width: 130px;
  height: 130px;
  border: 3px solid rgb(229 231 235);
  border-top-color: rgb(29 155 240);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.loading-screen-fade-out {
  animation: loading-fade-out 300ms ease-out forwards;
}

/* Turbo progress bar */
.turbo-progress-bar {
  background-color: rgb(29 155 240);
  height: 3px;
}

/* Turbo page transition feedback */
.turbo-loading {
  opacity: 0.6;
  transition: opacity 150ms ease;
}

@supports (view-transition-name: none) {
  .turbo-loading {
    opacity: 1 !important;
  }
}

/* Directional view transitions — smooth crossfade with directional hint */
main {
  view-transition-name: main-content;
}

::view-transition-group(root) {
  animation-duration: 0ms;
}

::view-transition-group(main-content) {
  animation-duration: 200ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Forward: subtle left-shift fade out, right-shift fade in */
html[data-turbo-visit-direction="forward"]::view-transition-old(main-content) {
  animation: vt-fade-out-left 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

html[data-turbo-visit-direction="forward"]::view-transition-new(main-content) {
  animation: vt-fade-in-right 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Back: subtle right-shift fade out, left-shift fade in */
html[data-turbo-visit-direction="back"]::view-transition-old(main-content) {
  animation: vt-fade-out-right 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

html[data-turbo-visit-direction="back"]::view-transition-new(main-content) {
  animation: vt-fade-in-left 200ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes vt-fade-out-left {
  to { opacity: 0; transform: translateX(-3%); }
}

@keyframes vt-fade-in-right {
  from { opacity: 0; transform: translateX(3%); }
}

@keyframes vt-fade-out-right {
  to { opacity: 0; transform: translateX(3%); }
}

@keyframes vt-fade-in-left {
  from { opacity: 0; transform: translateX(-3%); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(main-content) {
    animation-duration: 0ms;
  }
}

/* Standalone PWA: hide install banner, adjust safe areas */
.standalone .pwa-install-banner {
  display: none !important;
}

@media (max-width: 767px) {
  .standalone header.sticky {
    padding-top: env(safe-area-inset-top);
  }
}

/* Full-screen mobile dialogs */
@media (max-width: 767px) {
  .app-dialog:not(.app-dialog--sheet):not(.app-dialog--engagers) {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    inset: 0;
    transform: none;
    animation: dialog-slide-up 250ms ease-out;
  }

  .app-dialog:not(.app-dialog--sheet):not(.app-dialog--engagers)::backdrop {
    background: rgba(0, 0, 0, 0.5);
  }

  .app-dialog.app-dialog--tale-edit {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    inset: 0;
    transform: none;
    padding: 1.25rem 1rem 0;
    animation: dialog-slide-up 250ms ease-out;
  }
}

@keyframes dialog-slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Bottom sheet drag handle */
.mobile-bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 0;
}

.mobile-bottom-sheet-handle::before {
  content: "";
  width: 36px;
  height: 5px;
  border-radius: 9999px;
  background: rgb(209 213 219);
}

.mobile-bottom-sheet {
  overscroll-behavior: contain;
}

@keyframes slide-down {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(100%);
  }
}

.mobile-bottom-sheet-closing {
  animation: slide-down 200ms ease-in forwards;
}

/* Touch improvements: remove tap highlight, add active feedback */
@media (max-width: 767px) {

  a,
  button,
  [role="button"],
  summary,
  input[type="submit"] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  nav,
  button,
  [role="button"],
  summary,
  .tab-link,
  .engagement-btn {
    -webkit-user-select: none;
    user-select: none;
  }

  .engagement-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
    justify-content: center;
  }

  .engagement-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Immediate tap feedback on tale cards */
  article[data-controller="card-link"]:active {
    background-color: rgb(249 250 251); /* gray-50 */
    transition: background-color 50ms;
  }

  /* Engagement button press effect */
  .engagement-btn:active {
    transform: scale(0.9);
    transition: transform 50ms;
  }
}

/* Button press feedback on mobile */
@media (max-width: 767px) {
  .btn-press:active {
    transform: scale(0.97);
    transition: transform 50ms;
  }
}

/* Floating action button (FAB) */
.fab-button {
  position: fixed;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  right: 1rem;
  z-index: 35;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: rgb(29 155 240);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(29, 155, 240, 0.4);
  cursor: pointer;
  transition: transform 200ms ease, opacity 200ms ease, box-shadow 200ms ease;
}

.fab-button:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(29, 155, 240, 0.3);
}

.fab-hidden {
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
}

