/* A community's page. It shares the profile page's layout (profile.css) and changes what a railroad
   needs: a square picture like a Discord server's, reporting marks, hiring, the crew and the details. */

.cm-icon {
  position: relative;
  width: 152px;
  height: 152px;
  margin-top: -96px;
  border: 6px solid var(--night);
  border-radius: 36px;
  background: var(--night-2);
  object-fit: cover;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.cm-initials {
  display: grid;
  place-items: center;
  color: var(--moon);
  font: 800 52px/1 var(--display);
  font-stretch: 85%;
}

/* Reporting marks, stenciled like the letters on a car side. */
.cm-marks {
  padding: 6px 11px 5px;
  border: 2px solid rgba(255, 195, 92, 0.7);
  border-radius: 6px;
  color: var(--amber);
  font: 800 19px/1 var(--display);
  font-stretch: 78%;
  letter-spacing: 0.14em;
}

.cm-status {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--haze);
  font-size: 13.5px;
  font-weight: 700;
}

.cm-status.cm-hiring {
  border-color: rgba(79, 227, 161, 0.5);
  color: #8ff0c4;
}

.cm-tagline {
  color: var(--haze);
  font-size: 20px;
}

.cm-text + .cm-text {
  margin-top: 14px;
}

.cm-text {
  max-width: 68ch;
  white-space: pre-line;
}

/* ------------------------------------------------------------ applying */

.cm-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pink-press);
  color: var(--moon);
  font-size: 12.5px;
  font-weight: 800;
}

/* Your own application, under the tagline. */
.cm-yours {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  max-width: 760px;
  margin: 18px 28px 0;
  padding: 14px 18px;
  border: 1px solid rgba(255, 195, 92, 0.4);
  border-radius: 16px;
  background: rgba(255, 195, 92, 0.06);
}

.cm-yours p {
  flex: 1 1 320px;
  color: var(--haze);
}

.cm-yours b {
  color: var(--moon);
}

.cm-yours-no {
  border-color: rgba(255, 107, 130, 0.4);
  background: rgba(255, 107, 130, 0.06);
}

.cm-reason {
  flex-basis: 100%;
  margin: 2px 0 0;
  padding-left: 14px;
  border-left: 3px solid rgba(255, 107, 130, 0.5);
  color: var(--moon);
  white-space: pre-line;
}

.cm-apply-intro {
  color: var(--haze);
}

.cm-apply-questions {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

/* ------------------------------------------------------------ crew */

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

.cm-crew a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline: -10px;
  padding: 10px;
  border-radius: 14px;
  text-decoration: none;
}

.cm-crew a:hover {
  background: rgba(246, 241, 255, 0.05);
}

.cm-crew img {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--night-2);
}

.cm-crew span {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.cm-crew b,
.cm-crew small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-crew small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 14px;
}

/* ------------------------------------------------------------ details */

.cm-details {
  display: grid;
  margin: 12px 0 0;
}

.cm-details div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.cm-details div:last-child {
  border-bottom: 0;
}

.cm-details dt {
  color: var(--dim);
  white-space: nowrap;
}

.cm-details dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.cm-details a {
  color: var(--moon);
  text-underline-offset: 3px;
}

.cm-preview p,
.cm-bot-note p {
  display: block;
}

.cm-bot-note .button {
  justify-self: start;
  margin-top: 12px;
}

/* Leaving, and reporting, at the foot of the details. */
.cm-side-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 16px;
}

.cm-side-links .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
}

.cm-report {
  color: var(--dim);
}

.cm-side-links svg {
  width: 15px;
  height: 15px;
}

.cm-confirm {
  width: min(480px, calc(100% - 32px));
}

.cm-confirm-text {
  padding: 20px 24px;
  color: var(--haze);
}

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

.cm-icon-edit img {
  border-radius: 22px;
}

.cm-banner-edit {
  display: grid;
  gap: 12px;
}

.cm-banner-preview {
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, #241653, #150d31 72%);
}

.cm-banner-preview svg,
.cm-banner-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The drawn map in the small preview uses the same lines as the page's banner. */
.cm-banner-preview .c {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 55%, #c9b8ff);
  stroke-opacity: 0.25;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cm-banner-preview .track-casing {
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  opacity: 0.8;
}

.cm-banner-preview .track {
  fill: none;
  stroke: var(--moon);
  stroke-width: 3;
  opacity: 0.8;
}

.cm-marks-input {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cm-color {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cm-color input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(13, 8, 34, 0.6);
  cursor: pointer;
}

/* ------------------------------------------------------------ news */

.cm-news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.cm-news-head h2 {
  font-size: 26px;
  font-weight: 750;
  font-stretch: 86%;
}

.cm-news-head .button svg {
  width: 17px;
  height: 17px;
}

.cm-post {
  padding: 22px 0 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cm-post:first-child {
  padding-top: 0;
  border-top: 0;
}

.cm-post:focus {
  outline: none;
}

/* Pinned posts sit on a panel above the rest, like a notice on the depot's board. */
.cm-post.cm-post-pinned,
.cm-post.cm-post-linked {
  margin: 0 -22px 14px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel);
}

.cm-post-pinned + .cm-post:not(.cm-post-pinned) {
  border-top: 0;
}

.cm-post.cm-post-linked {
  border-color: color-mix(in srgb, var(--accent, var(--pink)) 60%, transparent);
}

.cm-post-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 13.5px;
  font-weight: 700;
}

.cm-post-pin svg {
  width: 15px;
  height: 15px;
}

.cm-post h3 {
  max-width: 34ch;
  font: 750 22px/1.2 var(--display);
  font-stretch: 88%;
  overflow-wrap: anywhere;
}

.cm-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--dim);
  font-size: 14px;
}

.cm-post-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--haze);
  font-weight: 650;
  text-decoration: none;
}

a.cm-post-author:hover {
  color: var(--moon);
}

.cm-post-author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.cm-post-actions {
  display: inline-flex;
  gap: 14px;
  margin-left: auto;
}

.cm-post-actions .text-button {
  font-size: 14px;
}

.cm-post-body {
  max-width: 68ch;
  margin-top: 14px;
}

.cm-post-body p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.cm-post-body p + p {
  margin-top: 12px;
}

.cm-post-body a {
  color: var(--moon);
  text-decoration-color: var(--accent, var(--pink));
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Long posts are cut short until "Read more". */
.cm-post-clamp {
  max-height: 11.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
  mask-image: linear-gradient(to bottom, #000 62%, transparent);
}

.cm-post-more {
  margin-top: 6px;
  font-weight: 700;
}

.cm-news-older {
  margin-top: 8px;
}

.cm-composer-body {
  min-height: 240px;
}

/* ------------------------------------------------------------ sessions */

.cm-sessions-note {
  margin-top: -6px;
  color: var(--dim);
  font-size: 14px;
}

.cm-session-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.cm-session {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 241, 255, 0.025);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cm-session:focus {
  outline: none;
}

/* The next one up stands out, in the community's colour. */
.cm-session-next {
  border-color: color-mix(in srgb, var(--accent, var(--pink)) 55%, transparent);
  background: var(--panel);
}

.cm-session-linked {
  border-color: var(--amber);
}

/* The date, like a leaf torn off a depot calendar. */
.cm-session-date {
  align-self: start;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 8px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(13, 8, 34, 0.6);
}

.cm-session-dow,
.cm-session-month {
  font-size: 12.5px;
  font-weight: 800;
}

.cm-session-dow {
  color: var(--amber);
}

.cm-session-month {
  color: var(--haze);
}

.cm-session-day {
  margin: 2px 0;
  color: var(--moon);
  font: 800 30px/1 var(--display);
  font-stretch: 84%;
}

.cm-session-main h3 {
  font: 750 21px/1.2 var(--display);
  font-stretch: 88%;
  overflow-wrap: anywhere;
}

.cm-session-when {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 6px;
  color: var(--haze);
  font-size: 14.5px;
}

.cm-session-soon {
  color: var(--amber);
  font-weight: 700;
}

.cm-session-on {
  color: #8ff0c4;
}

.cm-session-details {
  max-width: 68ch;
  margin-top: 10px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.cm-session-details a {
  color: var(--moon);
  text-decoration-color: var(--accent, var(--pink));
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.cm-session-crew {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
  color: var(--haze);
  font-size: 14.5px;
}

.cm-session-faces {
  display: flex;
  padding-left: 8px;
}

.cm-session-faces img {
  width: 26px;
  height: 26px;
  margin-left: -8px;
  border: 2px solid var(--night-2);
  border-radius: 50%;
  object-fit: cover;
}

.cm-session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 14px;
}

.cm-session-actions .button svg,
.cm-session-calendar svg {
  width: 16px;
  height: 16px;
}

.cm-session-calendar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Marking who ran. */
.cm-recent {
  margin-top: 8px;
}

.cm-recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-recent-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 16px;
  min-height: 52px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.cm-recent-list li:first-child {
  border-top: 0;
}

.cm-recent-when {
  color: var(--dim);
  font-size: 14.5px;
}

.cm-recent-title {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-recent-state {
  color: var(--haze);
  font-size: 14.5px;
}

.cm-recent-todo {
  color: var(--amber);
  font-weight: 650;
}

.cm-attend-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-attend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.cm-attend-list li:first-child .cm-attend {
  border-top: 0;
}

.cm-attend input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--pink);
}

.cm-attend img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.cm-attend span {
  min-width: 0;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-attend small {
  margin-left: auto;
  padding: 1px 8px;
  border: 1px solid rgba(79, 227, 161, 0.45);
  border-radius: 999px;
  color: #8ff0c4;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.cm-attend-count {
  margin-right: auto;
  color: var(--haze);
  font-size: 14.5px;
}

/* ------------------------------------------------------------ mods */

.cm-mods-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: -6px;
  color: var(--dim);
  font-size: 14.5px;
}

.cm-mods-progress {
  margin-top: 14px;
  color: var(--haze);
  font-size: 15px;
}

.cm-mods-done {
  color: #8ff0c4;
}

.cm-mods-group {
  margin: 24px 0 4px;
  color: var(--dim);
  font: 700 14.5px/1.3 var(--text);
}

.cm-mod-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each mod: your tick, its name and version, the loader it needs, and where to get it. */
.cm-mod {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto minmax(0, max-content);
  align-items: center;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.cm-mod-list .cm-mod:first-child {
  border-top: 0;
}

.cm-mod-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

.cm-mod-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent, var(--pink));
  cursor: pointer;
}

.cm-mod-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.cm-mod-name b {
  color: var(--moon);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cm-mod-version {
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--haze);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.cm-mod-new {
  padding: 1px 8px;
  border: 1px solid rgba(255, 195, 92, 0.5);
  border-radius: 999px;
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 700;
}

.cm-mod-have .cm-mod-name b {
  color: var(--haze);
}

.cm-mod-note {
  margin-top: 3px;
  color: var(--dim);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cm-mod-loader {
  color: var(--haze);
  font-size: 14px;
  white-space: nowrap;
}

.cm-mod-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--haze);
  font-size: 14px;
  font-weight: 650;
  text-underline-offset: 3px;
}

.cm-mod-link:hover {
  color: var(--moon);
}

.cm-mod-link svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.cm-mods-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 16px;
  color: var(--dim);
  font-size: 14.5px;
}

.cm-mods-tools .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
}

.cm-mods-tools svg {
  width: 16px;
  height: 16px;
}

/* The editor: one card per mod. */
.cm-mods-sheet {
  width: min(780px, 100%);
}

.cm-mods-help {
  color: var(--haze);
  font-size: 15px;
}

.cm-mod-rows {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-mod-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 14px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 241, 255, 0.025);
}

.cm-mod-number {
  display: grid;
  place-items: center;
  height: 42px;
  color: var(--dim);
  font-weight: 700;
}

.cm-mod-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 190px;
  align-items: center;
  gap: 8px;
}

.cm-mod-fields .input,
.cm-mod-fields .select {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 15px;
}

.cm-mod-fields [name="url"],
.cm-mod-fields [name="note"] {
  grid-column: 1 / 3;
}

.cm-mod-fields [aria-invalid="true"] {
  border-color: var(--red);
}

.cm-mod-fields .field-error {
  grid-column: 1 / -1;
  margin: 0;
}

.cm-mod-required {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--haze);
  font-size: 15px;
  cursor: pointer;
}

.cm-mod-required input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
}

.cm-mod-tools {
  display: inline-flex;
  justify-content: flex-end;
  gap: 14px;
  font-size: 14.5px;
}

.cm-mod-tools button:disabled {
  opacity: 0.35;
  cursor: default;
  text-decoration: none;
}

.cm-mod-adders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.cm-mod-adders .button svg {
  width: 16px;
  height: 16px;
}

.cm-paste {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.cm-paste .field {
  width: 100%;
}

/* ------------------------------------------------------------ open positions */

.cm-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-job {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cm-job-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.cm-job-head h3 {
  min-width: 0;
  font: 750 20px/1.2 var(--display);
  font-stretch: 88%;
  overflow-wrap: anywhere;
}

.cm-job-spots {
  flex: none;
  padding: 3px 10px;
  border: 1px solid rgba(79, 227, 161, 0.5);
  border-radius: 999px;
  color: #8ff0c4;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.cm-job-filled {
  border-style: dashed;
  background: none;
}

.cm-job-filled .cm-job-spots {
  border-color: var(--line-strong);
  color: var(--dim);
}

.cm-job-filled h3 {
  color: var(--haze);
}

.cm-job-about {
  color: var(--haze);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cm-job-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 2px;
  color: var(--dim);
  font-size: 14px;
}

.cm-job-role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cm-job-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.cm-job-waiting {
  color: var(--amber);
  font-weight: 650;
}

.cm-job-foot .button,
.cm-job-yours {
  margin-left: auto;
}

.cm-job-yours {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8ff0c4;
  font-weight: 650;
}

.cm-job-yours svg {
  width: 16px;
  height: 16px;
}

.cm-jobs-note {
  margin: -6px 0 14px;
  color: var(--amber);
  font-size: 14.5px;
}

/* The positions editor. */
.cm-jobs-sheet {
  width: min(720px, 100%);
}

.cm-job-rows {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-job-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 14px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 241, 255, 0.025);
}

.cm-job-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 210px;
  align-items: center;
  gap: 8px;
}

.cm-job-fields .input,
.cm-job-fields .select {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 15px;
}

.cm-job-fields [name="about"],
.cm-job-fields .cm-mod-tools,
.cm-job-fields .field-error,
.cm-job-fields .cm-job-full {
  grid-column: 1 / -1;
}

.cm-job-fields .field-error,
.cm-job-fields .cm-job-full {
  margin: 0;
}

.cm-job-fields [aria-invalid="true"] {
  border-color: var(--red);
}

@media (max-width: 980px) {
  /* On narrower screens the details follow the description, rather than leading like a profile's. */
  .community-page .pf-side {
    grid-row: auto;
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  .cm-job-fields {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .cm-job-fields [name="role"] {
    grid-column: 1 / -1;
  }

  .pf-actions .icon-button {
    flex: none;
  }

  .cm-yours {
    margin-inline: 12px;
  }

  .cm-icon {
    width: 116px;
    height: 116px;
    margin-top: -62px;
    border-width: 5px;
    border-radius: 28px;
  }

  .cm-initials {
    font-size: 40px;
  }

  .cm-tagline {
    font-size: 18px;
  }

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

  .cm-post.cm-post-pinned,
  .cm-post.cm-post-linked {
    margin-inline: -12px;
    padding-inline: 12px;
    border-radius: 16px;
  }

  .cm-post h3 {
    font-size: 20px;
  }

  .cm-post-actions {
    flex-basis: 100%;
    margin-left: 0;
  }

  .cm-session {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .cm-session-day {
    font-size: 26px;
  }

  .cm-recent-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cm-recent-when {
    grid-column: 1 / -1;
  }

  .cm-mod {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .cm-mod-loader,
  .cm-mod-link {
    grid-column: 2;
  }

  .cm-mod-loader:empty,
  .cm-mod > span:empty {
    display: none;
  }

  .cm-mod-fields {
    grid-template-columns: minmax(0, 1fr) 110px;
  }

  .cm-mod-fields .select,
  .cm-mod-fields [name="url"],
  .cm-mod-fields [name="note"] {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------ live maps */

.cm-maps {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.cm-map-list {
  display: grid;
  gap: 12px;
}

.cm-map {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(246, 241, 255, 0.025);
}

/* Live: lit up like the signal says clear. */
.cm-map-on {
  border-color: rgba(79, 227, 161, 0.42);
  background: var(--panel);
}

.cm-map-tile {
  align-self: start;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(13, 8, 34, 0.6);
  color: var(--dim);
}

.cm-map-tile svg {
  width: 28px;
  height: 28px;
}

.cm-map-on .cm-map-tile {
  border-color: rgba(79, 227, 161, 0.42);
  color: var(--green);
}

.cm-map-main {
  min-width: 0;
}

.cm-map-main h3 {
  font: 750 21px/1.2 var(--display);
  font-stretch: 88%;
  overflow-wrap: anywhere;
}

.cm-map-facts,
.cm-map-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin-top: 6px;
  color: var(--haze);
  font-size: 14.5px;
}

.cm-map-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8ff0c4;
  font-weight: 700;
}

.cm-map-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: cm-map-pulse 2.2s ease-out infinite;
}

@keyframes cm-map-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 227, 161, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(79, 227, 161, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-map-dot {
    animation: none;
  }
}

.cm-map-dispatching {
  color: #8fe6f7;
  font-weight: 650;
}

.cm-map-crew {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cm-map-crew svg {
  width: 15px;
  height: 15px;
}

.cm-map-setup {
  color: var(--dim);
  font-size: 14px;
}

.cm-map-setup b {
  color: var(--moon);
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* A host tried another save with this map's key. */
.cm-map-tried {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 195, 92, 0.32);
  border-radius: 12px;
  background: rgba(255, 195, 92, 0.07);
  color: var(--moon);
  font-size: 14.5px;
}

.cm-map-tried p {
  flex: 1 1 260px;
}

.cm-map-tried b {
  overflow-wrap: anywhere;
}

.cm-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 10px;
}

.cm-map-open svg {
  width: 16px;
  height: 16px;
}

/* The key, shown once. */
.cm-key {
  width: min(540px, calc(100% - 32px));
}

.cm-key-body {
  display: grid;
  gap: 18px;
  padding: 20px 24px;
  color: var(--haze);
}

.cm-key-box {
  display: flex;
  gap: 8px;
}

.cm-key-input {
  flex: 1;
  min-width: 0;
  color: var(--moon);
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: 14px;
}

.cm-key-box .button svg {
  width: 16px;
  height: 16px;
}

.cm-key-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.cm-key-steps b {
  color: var(--moon);
  overflow-wrap: anywhere;
}

.cm-key-guide {
  color: var(--haze);
  font-size: 14.5px;
}

.cm-key-guide a {
  color: var(--moon);
  text-underline-offset: 3px;
}

.cm-key-note {
  padding: 12px 14px;
  border: 1px solid rgba(255, 195, 92, 0.32);
  border-radius: 12px;
  background: rgba(255, 195, 92, 0.07);
  color: var(--moon);
  font-size: 14.5px;
}

/* A map's replays. */
.cm-replays {
  margin-top: 12px;
}

.cm-replays summary {
  width: fit-content;
  color: var(--haze);
  font-weight: 700;
  cursor: pointer;
}

.cm-replays summary:hover {
  color: var(--moon);
}

.cm-replays-list {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.cm-replays-note {
  color: var(--haze);
  font-size: 14.5px;
}

.cm-replay {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 10px;
}

.cm-replay:hover {
  background: rgba(246, 241, 255, 0.05);
}

.cm-replay-link {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
  color: var(--moon);
  text-decoration: none;
}

.cm-replay-link b {
  font-weight: 700;
}

.cm-replay-link span {
  overflow: hidden;
  color: var(--haze);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cm-replay-link:hover b {
  text-decoration: underline;
}

.cm-replay-delete[data-sure="true"] {
  color: var(--red, #ff6b82);
}

/* A map's stream link, for OBS. */
.cm-stream-intro {
  margin: 0;
}

.cm-stream-form {
  display: grid;
  gap: 14px;
}

.cm-stream-form[hidden],
.cm-stream-none[hidden] {
  display: none;
}

.cm-stream-more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.cm-stream-remove {
  margin-left: auto;
  color: var(--red, #ff6b82);
}

@media (max-width: 640px) {
  .cm-map {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .cm-map-tile {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .cm-map-tile svg {
    width: 23px;
    height: 23px;
  }

  .cm-map-open {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* ------------------------------------------------------------ session recaps (under a map) */

.cm-recap {
  margin-top: 8px;
  color: var(--haze);
  font-size: 14.5px;
  line-height: 1.5;
}

.cm-recap b {
  color: var(--moon);
  font-weight: 650;
}

.cm-recap-crew {
  display: block;
  color: var(--dim);
}

.cm-recap-more {
  margin-top: 6px;
  font-size: 14px;
}

.cm-recap-more summary {
  color: var(--haze);
  cursor: pointer;
}

.cm-recap-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--haze);
}

.cm-recap-when {
  display: block;
  color: var(--dim);
  font-size: 13px;
}

/* ------------------------------------------------------------ the crew's leaderboard (side) */

.cm-board {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.cm-board li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: baseline;
  gap: 10px;
}

.cm-board-rank {
  color: var(--dim);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cm-board li:first-child .cm-board-rank {
  color: var(--amber);
}

.cm-board-name {
  overflow: hidden;
  color: var(--moon);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-board-name:hover {
  text-decoration: underline;
}

.cm-board-value {
  color: var(--haze);
  font-variant-numeric: tabular-nums;
}

.cm-side-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--pink);
  font-size: 14px;
  font-weight: 650;
}
