/* Bir Günü Filmet (web/js/filmet*.js), laid out like N Sosyal's "Bir Günü Resmet": a floating rail on the
   left, the film centred with its version slider below, and the ideas in a tall panel on the right, all
   over a backdrop tinted by the picture on screen. The page takes the whole window (no Spaces sidebar). */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- the page's own palette */
body.filmet-mode {
  --bg: #120f0d;
  --surface: #1f1b19;
  --surface-2: #2a2522;
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-2: #d9d6d3;
  --muted: #9c9894;
  --faint: #6b6662;
  --fm-line: rgba(255, 255, 255, 0.075);
  --fm-panel: rgba(23, 21, 20, 0.92);
  --fm-pill: rgba(255, 255, 255, 0.1);
  --fm-pill-hover: rgba(255, 255, 255, 0.16);
  --fm-up: #7ed67a;
  --fm-down: #ff8f84;
  --fm-gold: #e9b65c;
  --fm-panel-w: clamp(380px, 32vw, 620px);
  --fm-screen-h: max(240px, calc(100vh - 230px)); /* the film fits the window with its controls below */
  background:
    radial-gradient(90% 70% at 20% 0%, rgba(120, 80, 46, 0.5), transparent 65%),
    radial-gradient(70% 60% at 45% 100%, rgba(70, 46, 30, 0.35), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* the page fits the window: no gutter kept for a scrollbar, and the canvas around it stays dark */
html:has(body.filmet-mode) { background: #120f0d; scrollbar-gutter: auto; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
body.filmet-mode .layout { display: block; padding: 0; }
body.filmet-mode .sidebar,
body.filmet-mode .aside,
body.filmet-mode .mobile-fab { display: none !important; }
body.filmet-mode .col { border: 0; }
body.filmet-mode .toast { background: #f4f0ea; color: #17120f; border-radius: 999px; font-weight: 600; }
body.filmet-mode .toast.error { background: #ff8f84; color: #2a0b07; }

.fm-boot, .fm-error { display: grid; place-items: center; align-content: center; gap: 16px; min-height: 100vh; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- frame */
.fm-page {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--fm-panel-w); gap: 48px;
  min-height: 100vh; padding: 24px 72px 24px 86px;
}
.fm-main, .fm-ideas { position: relative; z-index: 1; min-width: 0; }
.fm-page > [data-rail], .fm-page > [data-dialogs] { display: contents; } /* fixed rail, modal dialogs: no grid cell */

/* the colours of the picture on screen (a few pixels of it, stretched and softened) wash the backdrop */
.fm-ambient {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background: center / 100% 100% no-repeat; filter: blur(48px) saturate(1.1) brightness(0.42); opacity: 0.9;
}
.fm-page::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(85% 80% at 30% 35%, transparent 0%, rgba(13, 10, 8, 0.5) 75%),
    linear-gradient(90deg, transparent 30%, rgba(13, 11, 10, 0.62) 100%);
}

/* ---------------------------------------------------------------- head: logo, hashtag, share */
.fm-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 14px; }
.fm-logo {
  position: absolute; left: -68px; top: 0; display: grid; place-items: center; width: 44px; height: 44px;
  color: #fff; border-radius: 12px;
}
.fm-logo svg { width: 36px; height: 36px; }
.fm-logo:hover { color: #fff; opacity: 0.85; }
.fm-title { margin: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.fm-share {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 999px;
  background: none; color: var(--text-2); cursor: pointer; transition: background-color .15s, color .15s;
}
.fm-share:hover { background: var(--surface-hover); color: var(--text); }
.fm-share svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- buttons, pills and menus */
.fm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px;
  border-radius: 999px; border: 0; background: var(--fm-pill); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color .15s;
}
.fm-btn:hover:not(:disabled) { background: var(--fm-pill-hover); }
.fm-btn:disabled { opacity: .4; cursor: default; }
.fm-btn-primary { background: #fff; color: #141110; }
.fm-btn-primary:hover:not(:disabled) { background: #ebe6e0; }

.fm-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 16px; border: 0;
  border-radius: 999px; background: var(--fm-pill); color: var(--text); font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s;
}
.fm-pill:hover, .fm-pill[aria-expanded="true"] { background: var(--fm-pill-hover); }
.fm-pill.on { background: #fff; color: #141110; }
.fm-pill-sm { height: 30px; padding: 0 9px 0 12px; gap: 6px; font-size: 13px; background: rgba(255, 255, 255, 0.09); }
.fm-chev { width: 12px; height: 12px; flex: none; transition: transform .15s; }
[aria-expanded="true"] > .fm-chev { transform: rotate(180deg); }

.fm-menu-anchor { position: relative; }
.fm-menu {
  position: absolute; z-index: 60; min-width: 230px; max-width: 300px; max-height: min(62vh, 440px); overflow-y: auto;
  padding: 6px; border-radius: 16px; background: #24201d; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); animation: fm-pop .14s ease-out;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.fm-menu[hidden] { display: none; }
.fm-menu-below { top: calc(100% + 8px); }
.fm-menu-above { bottom: calc(100% + 8px); }
.fm-menu-below.fm-menu-end, .fm-menu-above.fm-menu-end { right: 0; }
.fm-menu-below.fm-menu-start, .fm-menu-above.fm-menu-start { left: 0; }
.fm-menu-right { left: calc(100% + 16px); }
.fm-menu-right.fm-menu-start { top: -8px; }
.fm-menu-right.fm-menu-end { bottom: -8px; }
@keyframes fm-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.fm-menu-head { margin: 6px 12px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fm-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer;
}
.fm-menu-item:hover:not(:disabled), .fm-menu-item:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.fm-menu-item:disabled { opacity: .45; cursor: default; }
.fm-menu-item.danger { color: var(--fm-down); }
.fm-menu-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.fm-menu-text small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.fm-menu-check { width: 16px; height: 16px; flex: none; }
.fm-menu-me { display: flex; align-items: center; gap: 12px; padding: 10px 12px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--fm-line); }
.fm-menu-me div { display: grid; gap: 2px; min-width: 0; }
.fm-menu-me strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-menu-me span:not(.fm-level) { color: var(--muted); font-size: 13px; }
.fm-menu-me .fm-level { margin-top: 2px; }

/* ---------------------------------------------------------------- the rail */
.fm-rail {
  position: fixed; left: 10px; top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 5px;
  border-radius: 999px; background: rgba(28, 24, 22, 0.6); border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.fm-rail-btn {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: rgba(255, 255, 255, 0.9); cursor: pointer; transition: background-color .15s, color .15s;
}
.fm-rail-btn svg { width: 22px; height: 22px; }
.fm-rail-btn:hover, .fm-rail-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; }
.fm-rail-btn.active { background: rgba(255, 255, 255, 0.24); color: #fff; }
.fm-rail-me { position: relative; display: block; margin-top: 2px; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; }
.fm-rail-me .fm-avatar { width: 44px; height: 44px; --ring: #fff; }
.fm-rail-me .fm-avatar .avatar { font-size: 14px; }
.fm-rail-me:hover .fm-avatar { --ring: rgba(255, 255, 255, 0.75); }
.fm-rail [data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%);
  padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.85); color: #fff; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s;
}
.fm-rail [data-tip]:hover::after, .fm-rail [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.fm-rail [aria-expanded="true"]::after { opacity: 0 !important; }

/* ---------------------------------------------------------------- the film */
.fm-player { --fm-ar: 1.7778; }
.fm-screen {
  position: relative; width: min(100%, calc(var(--fm-screen-h) * var(--fm-ar))); aspect-ratio: var(--fm-ar); margin: 0 auto;
  border-radius: 22px; overflow: hidden; background: #0d0b0a; box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}
.fm-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0d0b0a; }
.fm-label {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 14px; border-radius: 999px; background: rgba(28, 26, 25, 0.78); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fm-label[hidden] { display: none; }
.fm-label svg { width: 17px; height: 17px; }
.fm-label i { width: 8px; height: 8px; border-radius: 999px; background: var(--muted); }
.fm-label-live i { background: #ff4d4f; animation: fm-pulse 1.6s ease-out infinite; }
.fm-label-busy i { background: var(--fm-gold); animation: fm-pulse 1.6s ease-out infinite; }
@keyframes fm-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.fm-label-live { color: #fff; }
.fm-label-live i { color: rgba(255, 77, 79, 0.55); }
.fm-label-busy i { color: rgba(233, 182, 92, 0.55); }
.fm-expand {
  position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 999px; background: rgba(28, 26, 25, 0.72); backdrop-filter: blur(8px); color: #fff; cursor: pointer;
}
.fm-expand:hover { background: rgba(28, 26, 25, 0.92); }
.fm-expand svg { width: 19px; height: 19px; }

.fm-controls { margin-top: 20px; }
.fm-controls-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fm-controls-title { font-size: 15px; font-weight: 700; }
.fm-version {
  margin-left: auto; padding: 5px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 12, 11, 0.5); font-size: 14px; font-weight: 700;
}
.fm-version[hidden] { display: none; }

.fm-scrub { display: flex; align-items: center; gap: 14px; }
.fm-play { display: grid; place-items: center; width: 30px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; }
.fm-play:hover { opacity: .8; }
.fm-play svg { width: 20px; height: 20px; }
.fm-track { position: relative; flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); cursor: pointer; }
.fm-track:focus-visible { outline-offset: 7px; }
.fm-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: rgba(255, 255, 255, 0.5); pointer-events: none; }
.fm-slots { position: absolute; inset: -10px 0; }
.fm-slot { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.fm-slot::before { /* the notch between versions */
  content: ""; position: absolute; left: -1px; top: 8px; width: 2px; height: 12px; border-radius: 1px; background: rgba(255, 255, 255, 0.5);
}
.fm-slot:first-child::before { display: none; }
.fm-slot::after { content: ""; position: absolute; left: 1px; right: 1px; top: 10px; height: 8px; border-radius: 2px; transition: background-color .15s; }
.fm-slot:hover::after { background: rgba(255, 255, 255, 0.18); }
.fm-slot.selected::after { background: rgba(255, 255, 255, 0.26); }
.fm-knob {
  position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 999px; background: #fff;
  transform: translate(-50%, -50%); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); pointer-events: none;
}
.fm-pct { min-width: 46px; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fm-note { margin: 14px 0 0; color: rgba(255, 255, 255, 0.66); font-size: 14.5px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- the ideas */
.fm-ideas {
  position: sticky; top: 24px; display: flex; flex-direction: column; height: calc(100vh - 68px); min-height: 460px;
  border-radius: 28px; background: var(--fm-panel); border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden;
}
.fm-panel-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px 22px; border-bottom: 1px solid var(--fm-line); }
.fm-panel-head[hidden] { display: none; }
.fm-panel-titles { flex: 1; min-width: 0; }
.fm-panel-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 800; flex-wrap: wrap; }
.fm-panel-title svg { width: 20px; height: 20px; flex: none; }
.fm-count {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; padding: 4px 10px 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); font-size: 12.5px; font-weight: 700; color: #ebe8e5;
}
.fm-count::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #8f8a86; }
.fm-count.live::before { background: #ff4d4f; color: rgba(255, 77, 79, 0.55); animation: fm-pulse 1.6s ease-out infinite; }
.fm-panel-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.fm-panel-tools { display: flex; gap: 8px; flex: none; }

.fm-list {
  list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.fm-list::-webkit-scrollbar { width: 10px; }
.fm-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
.fm-list::-webkit-scrollbar-track { background: transparent; }
.fm-empty { padding: 48px 28px; text-align: center; color: var(--muted); }
.fm-loading { display: grid; place-items: center; padding: 24px; }
.fm-idea { padding: 18px 22px 16px; border-bottom: 1px solid var(--fm-line); }
.fm-idea.is-chosen { background: linear-gradient(90deg, rgba(233, 182, 92, 0.1), transparent 75%); }
.fm-idea-top { display: flex; align-items: center; gap: 12px; }

/* a picture ringed in the colour of the person's level */
.fm-avatar {
  --ring: rgba(255, 255, 255, 0.28);
  display: inline-grid; place-items: center; flex: none; width: 50px; height: 50px; padding: 2px;
  border-radius: 999px; background: var(--ring); transition: background-color .15s;
}
.fm-avatar .avatar { width: 100%; height: 100%; font-size: 16px; border: 2px solid #181614; }
.fm-avatar.sm { width: 32px; height: 32px; padding: 1.5px; }
.fm-avatar.sm .avatar { font-size: 11px; border-width: 1.5px; }
.fm-ring-l1 { --ring: #4fb878; }   /* member levels 1..5 (util.js levelBadge) */
.fm-ring-l2 { --ring: #3d9bff; }
.fm-ring-l3 { --ring: #a97bff; }
.fm-ring-l4 { --ring: #ff7f50; }
.fm-ring-l5 { --ring: #e9b04a; }

.fm-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fm-handle { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-level { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #ebe8e5; }
.fm-level svg { width: 14px; height: 14px; flex: none; }
.fm-level-l1 svg { color: #4fb878; }
.fm-level-l2 svg { color: #3d9bff; }
.fm-level-l3 svg { color: #a97bff; }
.fm-level-l4 svg { color: #ff7f50; }
.fm-level-l5 svg { color: #e9b04a; }
/* top right of an idea: "Filme girdi" and the author's score; a vote's change floats up from the score */
.fm-idea-tags { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.fm-score { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.fm-score b { color: #fff; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fm-score.neg { background: rgba(255, 107, 94, 0.12); }
.fm-score.neg b { color: #ff8a80; }   /* below zero (dislikes) */
.fm-bump { position: fixed; z-index: 60; transform: translate(-50%, -100%); pointer-events: none;
  font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  animation: fm-bump 1.4s cubic-bezier(.2, .7, .3, 1) forwards; }
.fm-bump.up { color: #5fd38d; }
.fm-bump.down { color: #ff6b5e; }
@keyframes fm-bump {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); }
  15% { opacity: 1; transform: translate(-50%, -110%) scale(1.12); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fm-bump { animation: fm-bump-still 1.4s linear forwards; }
  @keyframes fm-bump-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}
.fm-chosen { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(233, 182, 92, 0.14); color: var(--fm-gold); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.fm-chosen svg { width: 14px; height: 14px; }
.fm-idea-text { margin: 13px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.fm-unfold { margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 800; color: #fff; cursor: pointer; }
.fm-unfold:hover { text-decoration: underline; }

.fm-idea-foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.fm-idea-foot time { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fm-vote {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 8px;
  background: none; color: #bcb8b4; font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: color .15s, background-color .15s, transform .1s;
}
.fm-vote svg { width: 17px; height: 17px; }
.fm-vote:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.fm-vote:active:not(:disabled) { transform: scale(.94); }
.fm-vote:disabled { cursor: default; }
.fm-vote.up.on { color: var(--fm-up); }
.fm-vote.down.on { color: var(--fm-down); }
.fm-reply-btn { padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fm-reply-btn:hover { background: var(--surface-hover); color: var(--text); }
.fm-replies { margin-top: 12px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #79adff; cursor: pointer; }
.fm-replies:hover { text-decoration: underline; }

.fm-thread { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--fm-line); }
.fm-thread ul { list-style: none; margin: 0; padding: 0; }
.fm-reply { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.fm-reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-reply-head .fm-handle { font-size: 13.5px; }
.fm-reply-head .fm-level { font-size: 11.5px; }
.fm-reply-head time { margin-left: auto; color: var(--muted); font-size: 12px; }
.fm-reply-body p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.fm-reply-form { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fm-reply-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.07); color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.fm-reply-input:focus { border-color: rgba(255, 255, 255, 0.28); }

.fm-more { display: block; width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--fm-line); background: none; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fm-more:hover { background: var(--surface-hover); color: var(--text); }
.fm-more-slot:empty, .fm-compose-slot:empty { display: none; }

.fm-compose { display: flex; align-items: flex-end; gap: 10px; margin: 12px 14px 14px; padding: 6px 6px 6px 18px; border-radius: 24px; background: rgba(255, 255, 255, 0.07); border: 1px solid transparent; transition: border-color .15s; }
.fm-compose:focus-within { border-color: rgba(255, 255, 255, 0.24); }
.fm-compose-input {
  flex: 1; min-width: 0; max-height: 132px; padding: 9px 0; border: 0; background: none; resize: none;
  color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.45; outline: none;
}
.fm-compose-input::placeholder { color: var(--muted); }
.fm-compose-input:disabled::placeholder { color: var(--faint); }
.fm-counter { align-self: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fm-counter[hidden] { display: none; }
.fm-send {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 999px;
  background: #fff; color: #141110; cursor: pointer; transition: opacity .15s, transform .1s, background-color .15s;
}
.fm-send:hover:not(:disabled) { background: #ebe6e0; }
.fm-send:active:not(:disabled) { transform: scale(.94); }
.fm-send:disabled { opacity: .3; cursor: default; }
.fm-send svg { width: 17px; height: 17px; }
.fm-send-sm { width: 34px; height: 34px; }
.fm-send-sm svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- dialogs (admin tools, help) */
.fm-dialog {
  width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px;
  background: #1f1b19; color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.fm-dialog::backdrop { background: rgba(8, 6, 5, 0.62); backdrop-filter: blur(4px); }
.fm-dialog-body { display: grid; gap: 16px; padding: 26px; }
.fm-dialog h2 { margin: 0; font-size: 20px; font-weight: 800; }
.fm-dialog-text { margin: 0; color: var(--muted); font-size: 14px; }
.fm-dialog .input { background: rgba(255, 255, 255, 0.06); border: 1px solid transparent; border-radius: 12px; font-size: 15px; padding: 11px 14px; }
.fm-dialog .input:focus { border-color: rgba(255, 255, 255, 0.3); box-shadow: none; }
.fm-dialog select.input option { background: #24201d; }
.fm-field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.fm-hash { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--muted); }
.fm-plan-image img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 14px; }
.fm-plan-image-actions { display: flex; gap: 8px; }
.fm-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.fm-help-steps { display: grid; gap: 12px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.fm-help-steps li::marker { color: var(--muted); font-weight: 700; }

/* ---------------------------------------------------------------- narrower windows */
@media (max-width: 1180px) {
  .fm-page { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-right: 32px; }
  .fm-ideas { position: relative; top: 0; height: min(78vh, 760px); }
  body.filmet-mode { --fm-screen-h: max(240px, calc(100vh - 300px)); }
}
@media (max-width: 720px) {
  .fm-page { padding: 16px 16px 92px; gap: 20px; }
  .fm-head { margin-bottom: 12px; }
  .fm-logo { position: static; width: 36px; height: 36px; margin-right: 4px; }
  .fm-logo svg { width: 28px; height: 28px; }
  .fm-title { font-size: 22px; }
  .fm-screen { width: 100%; border-radius: 16px; }
  .fm-label { left: 10px; bottom: 10px; padding: 7px 12px; font-size: 13px; }
  .fm-expand { right: 10px; bottom: 10px; width: 36px; height: 36px; }
  .fm-ideas { height: 72vh; min-height: 380px; border-radius: 22px; }
  .fm-panel-head { flex-wrap: wrap; padding: 16px 16px 14px; }
  .fm-panel-tools { width: 100%; }
  .fm-idea { padding: 16px; }
  .fm-avatar { width: 44px; height: 44px; }
  /* the rail turns into a bar at the bottom, its menus into sheets above it (no transform or backdrop
     filter on the bar: either would hold the sheets' fixed position) */
  .fm-rail {
    top: auto; bottom: 14px; left: 0; right: 0; width: max-content; margin: 0 auto; transform: none; flex-direction: row;
    padding: 5px 8px; background: rgba(30, 26, 24, 0.94); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .fm-rail-me { margin: 0 0 0 2px; }
  .fm-rail-me .fm-avatar { width: 40px; height: 40px; }
  .fm-rail [data-tip]::after { display: none; }
  .fm-rail .fm-menu { position: fixed; left: 16px; right: 16px; top: auto !important; bottom: 80px; max-width: none; }
  body.filmet-mode .toasts { bottom: 86px; }
}
