/* links.css — Home links feed + modals */

/* ===== Pill palette (dedicated) ===== */
.mn-home {
  padding: 1.25rem 1rem 2rem;
}

.mn-home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.mn-home-title .mn-subtitle {
  margin: 0;
  opacity: 0.8;
  flex: 1 1 auto;
  min-width: 0;
}

.mn-home-kicker {
  margin: 0.1rem 0 0;
  font-family: var(--font-body);
  opacity: 0.85;
}

.mn-home-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Home grid */
#home .mn-home-grid{
  display: block;
}

#home .mn-home-left{
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

#home .mn-links-feed{
  width: 100%;
}

@media (max-width: 900px){
  #home .mn-home-grid{
    grid-template-columns: 1fr;
  }
}

/* Feed */
.mn-links-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mn-feed-more{
  display: flex;
  justify-content: center;
  padding: 0.25rem 0 0.75rem;
}

.mn-feed-toggle{
  opacity: 0.9;
}

.mn-feed-toggle:hover{
  opacity: 1;
}

/* Link card */
.mn-linkcard{
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.mn-linkcard-thumb {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--panel-border) 85%, transparent);
  background: color-mix(in srgb, var(--panel-bg) 70%, transparent);
  position: relative;
  z-index: 2;
}

/* iPhone Compatibility */
@supports (-webkit-touch-callout: none) {
  .mn-linkcard-thumb{
    min-height: 120px;
  }
}

.mn-linkcard-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mn-linkcard-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
}

.mn-linkcard-title {
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0;
}

.mn-linkcard-desc{
  margin: 0;
  opacity: 0.86;
  display: block;
  overflow: visible;
}

.mn-linkcard-meta {
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mn-linkcard-side{
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding-left: 0.16rem;
  align-self: stretch;
}

.mn-linkcard-side .mn-linkcard-meta{
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mn-pill{
  --pill-accent: var(--color-accent-soft);
  
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;

  font-size: 0.82rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;

  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 600;

  border: 0;
  background: color-mix(in srgb, var(--pill-accent) 18%, rgba(0,0,0,0));
  color: color-mix(in srgb, var(--pill-accent) 60%, var(--color-text) 40%);
  
  overflow: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

/* Category accent sources */
.mn-pill[data-cat="play"]           { --pill-accent: var(--pill-play); }
.mn-pill[data-cat="breathe"]        { --pill-accent: var(--pill-breathe); }
.mn-pill[data-cat="touching_grass"] { --pill-accent: var(--pill-touching_grass); }
.mn-pill[data-cat="read"]           { --pill-accent: var(--pill-read); }
.mn-pill[data-cat="news"]           { --pill-accent: var(--pill-news); }
.mn-pill[data-cat="media"]          { --pill-accent: var(--pill-media); }
.mn-pill[data-cat="art"]            { --pill-accent: var(--pill-art); }
.mn-pill[data-cat="food"]           { --pill-accent: var(--pill-food); }
.mn-pill[data-cat="uplifting"]      { --pill-accent: var(--pill-uplifting); }
.mn-pill[data-cat="discover"]       { --pill-accent: var(--pill-discover); }
.mn-pill[data-cat="uncover"]        { --pill-accent: var(--pill-uncover); }
.mn-pill[data-cat="join_in"]        { --pill-accent: var(--pill-join_in); }
.mn-pill[data-cat="stuff"]          { --pill-accent: var(--pill-stuff); }
.mn-pill[data-cat="silly"]          { --pill-accent: var(--pill-silly); }
.mn-pill[data-cat="music"]          { --pill-accent: var(--pill-music); }

/* Dark mode: slightly brighter chip */
body:not([data-mode="light"]) .mn-pill{
  background: color-mix(in srgb, var(--pill-accent) 30%, rgba(0,0,0,0.22));
  color: color-mix(in srgb, var(--pill-accent) 78%, #fff 22%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.10); /* ✅ was 0 0 0 1px */
}

/* Light mode */
body[data-mode="light"] .mn-pill{
  background: color-mix(in srgb, var(--pill-accent) 42%, #fff 58%);
  color: color-mix(in oklab, var(--pill-accent) 55%, #111 45%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pill-accent) 35%, rgba(0,0,0,0) 65%); /* ✅ inset */
}

/* Explicit dark mode */
body[data-mode="dark"] .mn-pill{
  background: color-mix(in srgb, var(--pill-accent) 28%, #0c0f13 72%);
  color: color-mix(in srgb, var(--pill-accent) 100%, #ffffff 18%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pill-accent) 28%, rgba(0,0,0,0) 72%); /* ✅ inset */
}

/* ===== Modals ===== */
.mn-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.mn-modal.hidden { display: none !important; }

.mn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.mn-modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 1.2rem));
  margin: 4.5rem auto 2rem;
  border-radius: var(--radius-panel);
  border: 1px solid var(--panel-border);
  background: var(--topbar-bg);
  box-shadow: 0 26px 70px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  padding: 0.9rem;
}

.mn-modal-panel-wide {
  width: min(980px, calc(100vw - 1.2rem));
}

.mn-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 0.75rem;
}

.mn-modal-head > div:first-child{
  flex: 1 1 auto; /* pushes search + close to the right */
}

.mn-modal-title {
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mn-modal-subtitle {
  opacity: 0.8;
  margin-top: 0.15rem;
  font-size: 0.92rem;
}

.mn-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mn-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .mn-form-row { grid-template-columns: 1fr; }
}

.mn-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mn-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  opacity: 0.75;
}

.mn-input,
.mn-textarea,
.mn-select {
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-panel) - 2px);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 0.55rem 0.6rem;
  color: var(--color-text);
  font-family: var(--font-body);
}

.mn-input:focus-visible,
.mn-textarea:focus-visible,
.mn-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

.mn-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider);
}

.mn-modal-actions-split {
  justify-content: space-between;
}

/* When a modal is underneath another, disable interaction */
.mn-modal.mn-modal-under{
  pointer-events: none;
}

/* More breathing room between fields in the Add Link modal */
#mnLinkModal .mn-linkform,
#mnLinkModal form#mnLinkForm{
  display: flex;
  flex-direction: column;
  gap: 0.9rem;              /* was effectively tighter */
}

/* If your .mn-field blocks are what stack, add spacing too */
#mnLinkModal .mn-field{
  margin: 0;                /* keep clean */
}

/* Labels slightly separated from inputs */
#mnLinkModal .mn-label{
  display: block;
  margin-bottom: 0.45rem;   /* increase label->control spacing */
}

/* If you have the 2-col row (Category/Scheduling), add row gap */
#mnLinkModal .mn-row{
  row-gap: 0.9rem;
}

/* Queue modal: cap height and scroll list */
#mnQueueModal .mn-modal-panel{
  max-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
}

#mnQueueModal #mnQueueList{
  overflow: auto;
  min-height: 0;
  padding-right: 0.25rem;
}

.mn-btn {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mn-btn-primary {
  background: color-mix(in srgb, var(--color-accent-soft) 22%, transparent);
}

.mn-btn-ghost {
  background: transparent;
}

/* Queue list */
.mn-queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
}

.mn-queue-item {
  position: relative;
}

.mn-queue-item.is-dragging {
  opacity: 0.6;
}

.mn-queue-controls {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  display: inline-flex;
  gap: 0.35rem;
  z-index: 2;
}

.mn-queue-mini {
  width: 30px;
  height: 30px;
}

/* =========================================================
   HOME LINKS
   ========================================================= */

#home .mn-linkcard[data-color="play"]           { --story-solid: var(--story-play); }
#home .mn-linkcard[data-color="breathe"]        { --story-solid: var(--story-breathe); }
#home .mn-linkcard[data-color="touching_grass"] { --story-solid: var(--story-touching_grass); }
#home .mn-linkcard[data-color="read"]           { --story-solid: var(--story-read); }
#home .mn-linkcard[data-color="news"]           { --story-solid: var(--story-news); }
#home .mn-linkcard[data-color="media"]          { --story-solid: var(--story-media); }
#home .mn-linkcard[data-color="art"]            { --story-solid: var(--story-art); }
#home .mn-linkcard[data-color="food"]           { --story-solid: var(--story-food); }
#home .mn-linkcard[data-color="uplifting"]      { --story-solid: var(--story-uplifting); }
#home .mn-linkcard[data-color="discover"]       { --story-solid: var(--story-discover); }
#home .mn-linkcard[data-color="uncover"]        { --story-solid: var(--story-uncover); }
#home .mn-linkcard[data-color="join_in"]        { --story-solid: var(--story-join_in); }
#home .mn-linkcard[data-color="stuff"]          { --story-solid: var(--story-stuff); }
#home .mn-linkcard[data-color="silly"]          { --story-solid: var(--story-silly); }
#home .mn-linkcard[data-color="music"]          { --story-solid: var(--story-music); }
#home .mn-linkcard[data-color="other"]          { --story-solid: var(--story-other); }

#home .mn-linkcard{
  --story-solid: var(--color-accent-soft);
  --story-fg: #fff;

  --story-base: color-mix(in srgb, var(--panel-bg) 22%, #000 78%);

  background:
    radial-gradient(120% 120% at 50% 50%,
      color-mix(in srgb, var(--panel-bg) 10%, transparent) 0%,
      transparent 60%
    ),

    /* left sheen */
    radial-gradient(120% 140% at 0% 50%,
      color-mix(in srgb, var(--story-solid) 26%, transparent) 0%,
      transparent 58%
    ),

    /* right sheen */
    radial-gradient(120% 140% at 100% 50%,
      color-mix(in srgb, var(--story-solid) 22%, transparent) 0%,
      transparent 60%
    ),

    /* subtle top gloss */
    linear-gradient(180deg,
      color-mix(in srgb, #fff 6%, transparent) 0%,
      transparent 34%
    ),

    /* base */
    linear-gradient(180deg,
      color-mix(in srgb, var(--story-base) 100%, #000 0%) 0%,
      color-mix(in srgb, var(--story-base) 92%, #000 8%) 55%,
      color-mix(in srgb, var(--story-base) 88%, #000 12%) 100%
    );

  color: var(--story-fg);
  border: 0;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 1px color-mix(in srgb, var(--story-solid) 16%, transparent),
    0 18px 50px rgba(0,0,0,0.35);
}

#home .mn-linkcard-thumb{
  border: 1px solid color-mix(in srgb, rgba(255,255,255,.18) 80%, transparent);
}

/* =========================================================
   HOME LINKS — Light mode skin (match news non-critical light)
   ========================================================= */

body[data-mode="light"] #home .mn-linkcard{
  position: relative;
  overflow: visible;
  isolation: isolate;

  --story-fg: #14131a;

  /* pale base similar to news in light mode */
  --story-base: color-mix(in srgb, #fff 86%, var(--panel-bg) 14%);

  background:
    /* subtle centre bloom */
    radial-gradient(120% 120% at 50% 35%,
      rgba(255,255,255,0.70) 0%,
      transparent 62%
    ),

    /* left tint */
    radial-gradient(120% 140% at 0% 50%,
      color-mix(in srgb, var(--story-solid) 20%, transparent) 0%,
      transparent 60%
    ),

    /* right tint */
    radial-gradient(120% 140% at 100% 50%,
      color-mix(in srgb, var(--story-solid) 16%, transparent) 0%,
      transparent 62%
    ),

    /* top gloss */
    linear-gradient(180deg,
      rgba(255,255,255,0.85) 0%,
      rgba(255,255,255,0.35) 22%,
      transparent 58%
    ),

    /* base */
    linear-gradient(180deg,
      color-mix(in srgb, var(--story-base) 100%, #fff 0%) 0%,
      color-mix(in srgb, var(--story-base) 92%, #fff 8%) 55%,
      color-mix(in srgb, var(--story-base) 88%, #fff 12%) 100%
    );

  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--story-solid) 16%, rgba(0,0,0,0.10)),
    0 16px 40px rgba(0,0,0,0.10);
}

body[data-mode="light"] #home .mn-linkcard-main{
  position: relative;
  z-index: 1;
}

/* the tint layer */
body[data-mode="light"] #home .mn-linkcard::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  border-radius: inherit;
  clip-path: inset(0 round inherit);

  background:
    radial-gradient(120% 90% at 15% 20%,
      color-mix(in oklab, var(--story-solid) 35%, transparent) 0%,
      transparent 60%),
    linear-gradient(135deg,
      color-mix(in oklab, var(--story-solid) 22%, transparent) 0%,
      transparent 55%);
  opacity: 0.55;
}

body[data-mode="light"] #home .mn-linkcard-main{
  position: relative;
  z-index: 1;
}

/* Thumbs in light mode: lighter chrome, readable text */
body[data-mode="light"] #home .mn-linkcard-thumb{
  background: rgba(255,255,255,0.55);
  border-color: rgba(0,0,0,0.10);
}

/* ===== Kebab menu (frosted) ===== */

.mn-linkcard{
  position: relative; /* for menu positioning */
  padding-right: 2.6rem; /* room for kebab */
}

.mn-linkcard-hit{
  display: contents; /* clickable thumb+text without wrapping the kebab */
  color: inherit;
  text-decoration: none;
  position: relative;
}

.mn-kebab{
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

/* Menu panel */
.mn-menu{
  position: absolute;
  top: 2.65rem;
  right: 0.55rem;
  min-width: 220px;
  padding: 0.35rem;
  border-radius: 16px;
  z-index: 50;

  /* Strong frost */
  background: rgba(18, 18, 22, 0.38);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);

  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 20px 60px rgba(0,0,0,0.45);
}

body[data-mode="light"] .mn-menu{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 20px 55px rgba(0,0,0,0.12);
}

.mn-menu.hidden{ display:none !important; }

.mn-menu-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
}

.mn-menu-item i{
  width: 18px;
  opacity: 0.85;
}

.mn-menu-item:hover,
.mn-menu-item:focus-visible{
  outline: none;
  background: color-mix(in srgb, var(--hover-bg) 45%, transparent);
}

.mn-menu-sep{
  height: 1px;
  margin: 0.35rem 0.25rem;
  background: color-mix(in srgb, var(--divider) 70%, transparent);
}

.mn-menu-danger{
  color: color-mix(in srgb, #ff4d4d 70%, var(--color-text) 30%);
}

/* Let kebab menu escape the card */
#home .mn-linkcard,
#mnQueueList .mn-linkcard {
  overflow: visible;
}

/* When a menu is open, lift that whole card above the feed */
#home .mn-linkcard.is-menu-open{
  z-index: 1000;
}

.mn-linkcard-thumb-link {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.mn-linkcard-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.mn-linkcard-title-link:hover .mn-linkcard-title,
.mn-linkcard-title-link:focus-visible .mn-linkcard-title {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
}

.mn-linkcard-thumb-link:hover .mn-linkcard-thumb img,
.mn-linkcard-thumb-link:focus-visible .mn-linkcard-thumb img {
  filter: brightness(1.12) saturate(1.05);
}

.mn-linkcard-hit-inner{
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0.96rem;
  align-items: stretch;
  min-height: 120px;
  position: relative;
}

/* mobile: keep your existing behaviour */
@media (max-width: 520px){
  .mn-linkcard-hit-inner{
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mn-linkcard-thumb{
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

.mn-linkcard-bar {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  pointer-events: all;
}

.mn-linkcard-age {
  opacity: 0.78;
}

body[data-mode="dark"] .mn-linkcard-age {
  opacity: 0.86;
}

.mn-linkcard-bar-sep {
  opacity: 0.35;
}

.mn-linkcard-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 140ms ease;
}

.mn-linkcard-stat:hover,
.mn-linkcard-stat:focus-visible {
  opacity: 1;
  outline: none;
}

.mn-linkcard-stat i {
  font-size: 0.82rem;
}

.mn-linkcard-likes:hover i,
.mn-linkcard-likes:focus-visible i {
  color: #ff6b8a;
}

.mn-linkcard-comments:hover i,
.mn-linkcard-comments:focus-visible i {
  color: color-mix(in srgb, var(--story-solid) 90%, #fff 10%);
}

.mn-news-refresh.hidden{ display:none !important; }
.mn-home-actions .mn-news-refresh{
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.mn-linktype-chooser{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 520px){
  .mn-linktype-chooser{ grid-template-columns: 1fr; }
}

.mn-choice-card{
  appearance: none;
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius-panel) - 2px);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 1rem 0.9rem;
  display: grid;
  place-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.mn-choice-card i{
  font-size: 1.7rem;
}

.mn-choice-card span{
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mn-choice-card:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

.mn-url-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.mn-circle-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  display: inline-grid;
  place-items: center;
  color: var(--color-text);
}

.mn-circle-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}

/* ===========================
   HOME RIGHT RAIL (widgets)
   =========================== */

.mn-home-right{
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  overflow: visible;
}

/* Sticky rail on desktop only */
@media (min-width: 901px){
  .mn-home-right{
    position: sticky;
    top: calc(var(--topbar-h) + 1rem);
    align-self: start;
  }
}

.mn-rail-card{
  padding: 0.8rem 0.85rem;
}

.mn-rail-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.mn-rail-title{
  font-family: var(--font-header);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mn-rail-meta{
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

.mn-rail-body{
  display: grid;
  gap: 0.35rem;
}

.mn-rail-small{
  font-size: 0.88rem;
  opacity: 0.78;
  line-height: 1.25;
}

/* Hits */
.mn-hits-number{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.mn-hits-plain{
  background: transparent;
  border: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.mn-hits-link{
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
}

.mn-hits-link:hover{ opacity: 1; }

/* Weather: monochrome icon “on top of background” */
.mn-weather-card{
  position: relative;
  overflow: hidden;
}

/* clickable “subtitle line” with crossfade */
.mn-hits-egg{
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.mn-hits-main{
  display: inline-block;
  transition: opacity 160ms ease;
}

.mn-hits-hover{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  display: inline-flex;
  gap: 0.45rem;
  align-items: baseline;

  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none; /* keep click on the link */
  white-space: nowrap;
}

/* hover/focus swap */
.mn-hits-egg:hover .mn-hits-main,
.mn-hits-egg:focus-visible .mn-hits-main{
  opacity: 0;
}

.mn-hits-egg:hover .mn-hits-hover,
.mn-hits-egg:focus-visible .mn-hits-hover{
  opacity: 0.9;
}

/* Hits hover: prevent ghosting by toggling visibility */
.mn-hits-egg{
  position: relative;
  display: inline-block;
  line-height: 1;           /* tighter + consistent */
}

/* ensure both layers share the same typography */
.mn-hits-main,
.mn-hits-hover{
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* main shown by default */
.mn-hits-main{
  display: inline-block;
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

/* hover hidden by default */
.mn-hits-hover{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 0.45rem;
  align-items: baseline;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
  pointer-events: none;
}

/* hover/focus: swap, with visibility flip to kill bleed-through */
.mn-hits-egg:hover .mn-hits-main,
.mn-hits-egg:focus-visible .mn-hits-main{
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 0s linear 0s;
}

.mn-hits-egg:hover .mn-hits-hover,
.mn-hits-egg:focus-visible .mn-hits-hover{
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 0s linear 0s;
}

.mn-hits-eggline{
  margin-top: 0.35rem;
  display: inline-grid;              /* key: stable layout */
  grid-template-areas: "stack";
  align-items: baseline;
  text-decoration: none;
  color: inherit;

  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1;                    /* stable height */
}

/* both layers occupy same grid cell */
.mn-hits-main,
.mn-hits-hover{
  grid-area: stack;
}

.mn-hits-main{
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

.mn-hits-hover{
  display: inline-flex;
  gap: 0.45rem;
  align-items: baseline;
  white-space: nowrap;
  pointer-events: none;

  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

/* swap */
.mn-hits-eggline:hover .mn-hits-main,
.mn-hits-eggline:focus-visible .mn-hits-main{
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 0s linear 0s;
}

.mn-hits-eggline:hover .mn-hits-hover,
.mn-hits-eggline:focus-visible .mn-hits-hover{
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 0s linear 0s;
}

.mn-weather-bgicon{
  position: absolute;
  inset: -14px -10px auto auto;
  width: 110px;
  height: 110px;
  opacity: 0.18;
  pointer-events: none;
  color: currentColor; /* monochrome */
  filter: saturate(0);
}

body[data-mode="dark"] .mn-weather-bgicon{ opacity: 0.22; }

.mn-weather-bgicon svg{
  width: 100%;
  height: 100%;
  display: block;
}

.mn-weather-body{
  padding-right: 5.5rem; /* so text doesn’t collide with icon */
}

.mn-weather-temp{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 2.0rem;
  line-height: 1;
}

.mn-weather-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.mn-weather-cell{
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.25rem;
}

.mn-weather-cap{
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.70;
}

.mn-weather-miniicon{
  width: 34px;
  height: 34px;
  opacity: 0.95;
}

.mn-weather-miniicon svg{
  width: 100%;
  height: 100%;
  display: block;
}

.mn-weather-minitemp{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.9;
}

/* Weather: plain (no card) */
.mn-weather-plain{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.mn-weather-plain:hover,
.mn-weather-plain:focus-within{
  outline: none !important;
}

/* Grid layout: [Location] + 3 forecast columns */
.mn-weather-grid{
  display: grid;
  gap: 0.55rem;
}

/* Header row for times */
.mn-weather-times{
  display: grid;
  grid-template-columns: 88px repeat(3, 1fr);
  align-items: end;
  gap: 0.6rem;
}

.mn-weather-time{
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.75;
  text-align: center;
}

.mn-weather-time.is-spacer{
  text-align: left;
  opacity: 0.0; /* invisible but keeps alignment */
}

/* Location rows */
.mn-weather-rows{
  display: grid;
  gap: 0.55rem;
}

.mn-weather-row{
  display: grid;
  grid-template-columns: 88px repeat(3, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.mn-weather-loc{
  font-size: 0.82rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.85;
  white-space: nowrap;
}

/* Each forecast cell: icon + temp */
.mn-weather-cell{
  display: grid;
  justify-items: center;
  gap: 0.18rem;
}

.mn-weather-miniicon{
  width: 28px;
  height: 28px;
  opacity: 0.92;
}

.mn-weather-miniicon svg{
  width: 100%;
  height: 100%;
  display: block;
}

.mn-weather-minitemp{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.92;
}

/* Weather: one-row random town */
.mn-weather-plain{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mn-weather-one{
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.8rem;
  align-items: center;
}

.mn-weather-place{
  display: grid;
  gap: 0.35rem;
  align-content: center;
}

.mn-weather-townbtn{
  position: relative;
  display: inline-grid;
  align-items: center;
  justify-items: start;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

.mn-weather-towntext{
  font-size: 0.82rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.9;
  white-space: nowrap;
  transition: opacity 160ms ease;
}

.mn-weather-edit{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;

  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;

  transition: opacity 160ms ease;
  pointer-events: none; /* so click still hits the button */
}

/* Hover/focus state: town fades out, EDIT fades in */
.mn-weather-townbtn:hover .mn-weather-towntext,
.mn-weather-townbtn:focus-visible .mn-weather-towntext{
  opacity: 0;
}

.mn-weather-townbtn:hover .mn-weather-edit,
.mn-weather-townbtn:focus-visible .mn-weather-edit{
  opacity: 0.9;
}

/* Optional: subtle affordance */
.mn-weather-townbtn:hover,
.mn-weather-townbtn:focus-visible{
  opacity: 1;
}

.mn-weather-townbtn.is-loading{ opacity: 0.6; }

.mn-weather-town{
  font-size: 0.82rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.9;
  white-space: nowrap;
}

.mn-weather-refresh{
  width: 26px;
  height: 26px;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.75;
  line-height: 1;
}

.mn-weather-refresh:hover{ opacity: 1; }
.mn-weather-refresh:active{ transform: translateY(1px); }

.mn-weather-refresh[disabled]{ animation: mn-spin 0.8s linear infinite; }
@keyframes mn-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.mn-weather-cols{
  display: grid;
  gap: 0.5rem;
}

.mn-weather-timehead{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mn-weather-time{
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.75;
  text-align: center;
}

.mn-weather-cells{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mn-weather-cell{
  display: grid;
  justify-items: center;
  gap: 0.18rem;
}

.mn-weather-miniicon{
  width: 28px;
  height: 28px;
  opacity: 0.92;
}
.mn-weather-miniicon svg{ width: 100%; height: 100%; display:block; }

.mn-weather-minitemp{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.92;
}

/* ===========================
   GUESTBOOK — bubbles + popover
   =========================== */

.mn-guestbook{
  background: transparent;
  border: 0;
  padding: 0;
}

.mn-guestbook-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 0.6rem;
}

/* Guestbook: when composing, hide bubbles so popover replaces them */
.mn-guestbook.is-composing .mn-gb-bubbles {
  display: none;
}

.mn-guestbook.is-composing .mn-gb-pager{
  display: none;
}

.mn-gb-pager{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.mn-gb-pagebtn{
  width: 32px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: transparent;
  cursor: pointer;
  opacity: 0.9;
}

.mn-gb-pagebtn:disabled{
  opacity: 0.35;
  cursor: default;
}

.mn-gb-pageinfo{
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.mn-gb-warn{
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.25;
}

.mn-gb-count{
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.mn-rail-subtitle{
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* plus button */
.mn-gb-plus{
  width: 30px;
  height: 30px;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.9;
}

.mn-gb-plus:hover{ opacity: 1; }
.mn-gb-plus:active{ transform: translateY(1px); }

/* popover anchored under + */
.mn-gb-pop{
  position: relative;
  margin: 0 0 0.75rem;
}

.mn-gb-pop[hidden]{ display:none; }

.mn-gb-form{
  position: relative;
  border: 1px solid var(--divider);
  background: rgba(0,0,0,0.0); /* transparent */
  padding: 0.65rem;
  border-radius: 0.9rem;
  box-shadow: none;
}

/* little tail pointing up toward + */
.mn-gb-form::before{
  content:"";
  position:absolute;
  right: 10px;
  top: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--divider);
  border-top: 1px solid var(--divider);
  background: transparent;
  transform: rotate(45deg);
}

/* actions row */
.mn-gb-actions{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "meta meta"
    "count btn";
  gap: 0.55rem 0.6rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* map existing elements into areas */
#mnGuestbookStatus,
#mnGuestbookWarn{
  grid-area: meta;
}

#mnGuestCount{ grid-area: count; }
#mnGuestSubmit{ grid-area: btn; }

/* keep status + warn stacked nicely */
#mnGuestbookStatus{
  margin-bottom: 0.15rem;
}

/* speech bubbles list */
.mn-gb-bubbles{
  display: grid;
  gap: 0.65rem;
}

.mn-gb-bubble{
  position: relative;
  border: 1.2px solid currentColor;
  border-right: 0;              /* key: remove the line that crosses the tail */
  overflow: visible;
  background: transparent;
  border-radius: 0.1rem;
  padding: 0.55rem 0.55rem 0.6rem;
  padding-right: 0.9rem;
}

/* Tail */
.mn-gb-bubble::before{
  content:"";
  position:absolute;
  right: -8px;
  top: 56%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
  border-top: 1.2px solid currentColor;
  border-right: 1.2px solid currentColor;
}

.mn-gb-bubble::after{
  content:"";
  position:absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-right: 1.2px solid currentColor;
  /* punch a gap where the tail attaches */
  clip-path: polygon(
    0 0, 100% 0, 100% 44%, 0 44%,
    0 68%, 100% 68%, 100% 100%, 0 100%
  );
}
.mn-gb-bubbles,
.mn-gb-bubble{
  overflow: visible;
}

/* bubble header (who + when) */
.mn-gb-top{
  display:flex;
  gap: 0.4rem;
  align-items: baseline;
}

.mn-gb-who{
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.92rem;
}

.mn-gb-when{
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.65;
}

.mn-gb-msg{
  margin: 0.25rem 0 0;
  opacity: 0.85;
  line-height: 1.25;
  white-space: pre-wrap;
}

/* Hits (eggline) — hard reset to prevent old .mn-hits-hover absolute rules interfering */
.mn-hits-eggline{
  display: inline-grid;
  grid-template-areas: "stack";
  align-items: baseline;
  line-height: 1;
}

.mn-hits-eggline .mn-hits-main,
.mn-hits-eggline .mn-hits-hover{
  grid-area: stack;

  /* reset old absolute-positioning variants */
  position: static;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
}

/* LAUNCH: hide guestbook widget */
.mn-guestbook { display: none !important; }

/* =========================================================
   SCHEDULER (QUEUE MODAL) — collapsed cards
   ========================================================= */

/* Scheduler (queue modal) — collapsed row layout */
#mnQueueList .mn-linkcard.is-collapsed{
  padding: 0.55rem 0.85rem;
  padding-right: 5.3rem;
}

/* Hide the image + description when collapsed */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-thumb{
  display: none;
}

#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-desc{
  display: none;
}

/* Collapsed queue cards: pills then title on ONE line */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-hit-inner{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 0; /* override the 120px min-height */
}

/* Hide thumb; keep pills */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-thumb{
  display: none;
}

/* Side column becomes just “meta” */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-side{
  display: contents; /* let meta participate in the flex line */
}

/* Meta (pills) on the left */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-meta{
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

/* Main becomes just the title area */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-main{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

/* Title truncates */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-title{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Title goes RIGHT + truncates */
#mnQueueList .mn-linkcard.is-collapsed .mn-linkcard-title{
  order: 1;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Keep only first pill in collapsed mode */
#mnQueueList .mn-linkcard.is-collapsed .mn-pill:not(:first-child){
  display:none;
}

/* In scheduler cards, place chevrons just left of kebab */
#mnQueueList .mn-linkcard .mn-queue-controls{
  position: absolute;
  top: 0.55rem;
  right: 2.75rem; /* kebab is at 0.55rem; this sits left of it */
  display: inline-flex;
  gap: 0.35rem;
  z-index: 2;
}

#mnQueueList .mn-linkcard .mn-queue-mini{
  width: 30px;
  height: 30px;
}

/* Queue modal header search (top-right, left of close) */
.mn-queue-header{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mn-queue-header .mn-queue-spacer{
  flex: 1 1 auto; /* if you need push-right layout */
}

.mn-queue-search{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mn-queue-search input{
  width: min(320px, 40vw);
  height: 36px;
  padding: 0 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: inherit;
  outline: none;
}

.mn-queue-search input:focus{
  border-color: rgba(255,255,255,0.25);
}

.mn-queue-search #mnQueueSearchClear{
  width: 36px;
  height: 36px;
}

/* =========================================================
   LINK CARD — interactive hit-area refinements
   ========================================================= */

.mn-linkcard-thumb img {
  transition: filter 180ms ease;
}

/* =========================================================
   URL COPY PILL
   ========================================================= */

.mn-url-pill,
.mn-video-pill,
.mn-music-pill {
  cursor: pointer;
  transition:
    box-shadow 160ms ease,
    background 160ms ease;
  pointer-events: all;
  position: relative;
  z-index: 3;
  text-decoration: none;
}

body[data-mode="light"] .mn-url-pill:hover,
body[data-mode="light"] .mn-url-pill:focus-visible,
body[data-mode="light"] .mn-video-pill:hover,
body[data-mode="light"] .mn-video-pill:focus-visible,
body[data-mode="light"] .mn-music-pill:hover,
body[data-mode="light"] .mn-music-pill:focus-visible {
  outline: none;
  text-decoration: none;
  background: color-mix(in srgb, var(--pill-accent) 55%, transparent) !important;
}

body:not([data-mode="light"]) .mn-url-pill:hover,
body:not([data-mode="light"]) .mn-url-pill:focus-visible,
body:not([data-mode="light"]) .mn-video-pill:hover,
body:not([data-mode="light"]) .mn-video-pill:focus-visible,
body:not([data-mode="light"]) .mn-music-pill:hover,
body:not([data-mode="light"]) .mn-music-pill:focus-visible {
  outline: none;
  text-decoration: none;
  background: color-mix(in srgb, var(--pill-accent) 38%, transparent) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pill-accent) 40%, transparent),
    0 0 8px 2px color-mix(in srgb, var(--pill-accent) 20%, transparent),
    0 0 18px 5px color-mix(in srgb, var(--pill-accent) 10%, transparent);
}

/* Description counter */
.mn-desc-counter {
  font-size: 0.75rem;
  text-align: right;
  opacity: 0.6;
  margin-top: -0.25rem;
  letter-spacing: 0.05em;
  transition: color 120ms ease, opacity 120ms ease;
}

.mn-desc-counter-over {
  color: #ff5555;
  opacity: 1;
  font-weight: 600;
}

.mn-btn-disabled,
.mn-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================================
   COMMENTS SECTION
   ========================================================= */

/* Hidden by default; shown when toggled */
.mn-comments-section {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: -2.6rem;
  padding-right: 1.5rem;
}

.mn-comments-section > .mn-comments-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0 0;
  transition: padding 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mn-comments-section.mn-comments-open {
  grid-template-rows: 1fr;
}

.mn-comments-section.mn-comments-open > .mn-comments-inner {
  padding: 0 0 1.5rem;
}

/* Divider — inset from both sides */
.mn-comments-divider {
  height: 1px;
  margin: 0 0.25rem 0.1rem;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

/* Empty state */
.mn-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 0 0.25rem;
  opacity: 0.72;
  text-align: center;
}

.mn-comments-empty-icon {
  font-size: 2rem;
  opacity: 0.7;
  line-height: 1;
}

.mn-comments-empty-label {
  /* mirrors .mn-subtitle but scaled for context */
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0;
}

/* Comment list */
.mn-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mn-comment {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.mn-comment-username {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

.mn-comment-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.88;
}

/* Compose area */
.mn-comments-compose {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.mn-comments-input {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--panel-border) 70%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-bg) 55%, transparent);
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.55rem 0.65rem;
  resize: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.mn-comments-input::placeholder {
  opacity: var(--placeholder-opacity, 0.42);
}

.mn-comments-input:focus {
  outline: none;
  border-color: color-mix(in srgb, currentColor 28%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--story-solid, currentColor) 18%, transparent);
}

.mn-comments-post {
  align-self: flex-end;
  border: 1px solid color-mix(in srgb, var(--panel-border) 60%, transparent);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--story-solid, currentColor) 16%, transparent);
  color: inherit;
  cursor: pointer;
  transition: background 140ms ease, opacity 140ms ease;
}

.mn-comments-post:hover,
.mn-comments-post:focus-visible {
  background: color-mix(in srgb, var(--story-solid, currentColor) 26%, transparent);
  outline: none;
}

.mn-comments-post:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Active state on the comment toggle button */
.mn-linkcard-stat-active {
  opacity: 1 !important;
}

.mn-comments-compose-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.mn-comments-counter {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0.55;
  transition: color 120ms ease, opacity 120ms ease;
}

.mn-comments-counter-over {
  color: #ff5555;
  opacity: 1;
  font-weight: 600;
}

.mn-comments-divider,
.mn-comments-list,
.mn-comments-compose {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.mn-comments-section.mn-comments-open .mn-comments-divider {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 60ms;
}

.mn-comments-section.mn-comments-open .mn-comments-list {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

.mn-comments-section.mn-comments-open .mn-comments-compose {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 180ms;
}

.mn-linkcard-stat-active i {
  color: color-mix(in srgb, var(--story-solid) 90%, #fff 10%);
}

/* Comment header row */
.mn-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Meatball button */
.mn-comment-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.mn-comment-meatball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  cursor: pointer;
  opacity: 0.35;
  color: inherit;
  transition: opacity 140ms ease, background 140ms ease;
}

.mn-comment-meatball:hover,
.mn-comment-meatball:focus-visible {
  opacity: 0.85;
  outline: none;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.mn-comment-meatball i {
  font-size: 0.78rem;
}

/* Dropdown */
.mn-comment-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  min-width: 140px;
  padding: 0.3rem;
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body[data-mode="light"] .mn-comment-dropdown {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.mn-comment-dropdown.hidden {
  display: none !important;
}

.mn-comment-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}

.mn-comment-menu-item:hover,
.mn-comment-menu-item:focus-visible {
  background: color-mix(in srgb, currentColor 8%, transparent);
  outline: none;
}

.mn-comment-menu-item i {
  width: 14px;
  opacity: 0.85;
}

.mn-comment-menu-danger {
  color: color-mix(in srgb, #ff4d4d 75%, currentColor 25%);
}

/* Video platform pills */
.mn-video-pill {
  text-decoration: none;
  cursor: pointer;
  transition:
    box-shadow 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

/* Upside-down star for Nebula */
.mn-nebula-star {
  display: inline-block;
  transform: rotate(180deg);
  font-size: 0.78rem;
}

/* Dropout :D logo mark */
.mn-dropout-logo {
  font-family: var(--font-header);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

/* Music platform pills */
.mn-music-pill {
  text-decoration: none;
  cursor: pointer;
  transition:
    box-shadow 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

/* Hidden field helper (for category field when music kind) */
.mn-field.hidden {
  display: none !important;
}

.mn-linkcard-dot {
  opacity: 0.45;
  margin: 0 0.15em;
}
.mn-linkcard-artist {
  font-weight: 400;
  font-style: italic;
  opacity: 0.82;
}

/* ===== Categories modal ===== */
.mn-categories-wrap {
  max-height: calc(100vh - 16rem);
  overflow: auto;
  padding: 0.25rem 0 0.5rem;
}
.mn-categories-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
}
.mn-categories-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.7;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--divider);
  font-weight: 600;
}
.mn-categories-table tbody td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid color-mix(in srgb, var(--divider) 55%, transparent);
}
.mn-cat-col-dot { width: 18px; }
.mn-cat-col-del { width: 36px; }
.mn-cat-dirty-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent-soft) 80%, #fff 20%);
  opacity: 0;
  transition: opacity 120ms ease;
}
.mn-cat-row.is-dirty .mn-cat-dirty-dot { opacity: 1; }
.mn-cat-row.is-new .mn-cat-dirty-dot {
  opacity: 1;
  background: #7fd3a6;
}
.mn-cat-name-input,
.mn-cat-hex-input {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  padding: 0.4rem 0.55rem;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  width: 100%;
}
.mn-cat-hex-input {
  width: 92px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: lowercase;
}
.mn-cat-name-input:focus-visible,
.mn-cat-hex-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent-soft) 35%, transparent);
}
.mn-cat-hex-input.is-invalid {
  border-color: #ff5555;
}
.mn-cat-swatch {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 70%, transparent);
  vertical-align: middle;
}
.mn-cat-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: inherit;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.75;
}
.mn-cat-del-btn:hover { opacity: 1; }
.mn-categories-addrow {
  display: flex;
  justify-content: flex-start;
  padding: 0.65rem 0.25rem 0.25rem;
}
@media (max-width: 640px) {
  .mn-cat-hex-input { width: 78px; }
  .mn-categories-table thead th { font-size: 0.66rem; }
}

.mn-cat-swatch-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  line-height: 0;
}
.mn-cat-swatch-wrap .mn-cat-swatch {
  cursor: pointer;
  transition: transform 120ms ease;
}
.mn-cat-swatch-wrap:hover .mn-cat-swatch {
  transform: scale(1.08);
}
.mn-cat-color-picker {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* =========================================================
   PINNED POST
   ========================================================= */
.mn-pinned-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mn-pinned-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.15rem;
  opacity: 0.72;
}

.mn-pinned-label i {
  font-size: 0.78rem;
  transform: rotate(-30deg);
}

.mn-pinned-divider {
  width: 100%;
  height: 1px;
  margin: 0.9rem 0 1rem;
  opacity: 0.28;
  background-image: linear-gradient(to right, currentColor 50%, transparent 50%);
  background-size: 16px 1px;
  background-repeat: repeat-x;
}

/* =========================================================
   PINNED POST — mobile condensed view
   ========================================================= */
@media (max-width: 520px) {
  /* Condensed by default on mobile */
  #home .mn-linkcard.is-pinned {
    padding: 0.65rem 0.85rem;
    padding-right: 2.6rem; /* keep room for kebab */
    cursor: pointer;
  }

  /* Hide thumb + desc when condensed */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-thumb-link {
    display: none;
  }
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-desc {
    display: none;
  }

  /* Collapse the hit-inner grid into a single flex row */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-hit-inner {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 0;
  }

  /* Title tighter, allow wrap to 2 lines max */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-title {
    font-size: 1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Meta pills stay inline, compact */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-meta {
    margin-top: 0;
    gap: 0.35rem;
  }

  /* Move age/likes/comments bar from absolute to inline flow */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded) .mn-linkcard-bar {
    position: static;
    right: auto;
    bottom: auto;
    margin-top: 0.15rem;
    padding-left: 0.05rem;
  }

  /* Hint affordance: subtle chevron on the right (SVG) */
  #home .mn-linkcard.is-pinned:not(.is-pinned-expanded)::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    background-color: currentColor;
    opacity: 0.5;
    pointer-events: none;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' stroke='black' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' stroke='black' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
  }

  /* No chevron when expanded */
  #home .mn-linkcard.is-pinned.is-pinned-expanded::after {
    display: none;
  }

  /* Smooth expand animation */
  #home .mn-linkcard.is-pinned .mn-linkcard-thumb-link,
  #home .mn-linkcard.is-pinned .mn-linkcard-desc {
    transition: opacity 260ms ease 80ms;
  }
  #home .mn-linkcard.is-pinned.is-pinned-expanded .mn-linkcard-thumb-link,
  #home .mn-linkcard.is-pinned.is-pinned-expanded .mn-linkcard-desc {
    opacity: 1;
    animation: mn-pinned-fade-in 320ms ease both;
  }

  @keyframes mn-pinned-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
