/* Home page identity. The clock continues to set day, eve and night. */
@font-face {
  font-family: "Press Start 2P";
  src: url("/static/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.sunset-home {
  --bg: #111518;
  --surf: #1b2227;
  --surf2: #252e34;
  --text: #f5f1e8;
  --muted: #ccdae2;
  --orange: #ffc46c;
  --oglow: rgba(255, 177, 79, .28);
  --osoft: rgba(255, 177, 79, .16);
  --brd: rgba(243, 238, 230, .14);
  --brdh: rgba(243, 238, 230, .32);
  --action-bg: #ffaa00;
  --sunrise-stripe: linear-gradient(to top, #ff5555, #ffaa00 52%, #ffff55);
  --action-ink: #35200e;
  --secondary-action: #c4d2bb;
  --secondary-ink: #203514;
  --sticker-bg: #28362f;
  --section-accent: #ffcf82;
  --section-surface: #222b31;
  --horizon-sky: #364553;
  --horizon-sun: #ffff55;
  --horizon-land: #00aa00;
  --status-on: #79f2a9;
  --status-off: #ffb1ac;
  --status-maint: #ffe087;
  --sticker-ring: rgba(164, 179, 182, .22);
  --sticker-shadow: rgba(16, 7, 28, .32);
}

.sunset-home.day {
  --bg: #f4efe6;
  --surf: #fdfbf6;
  --surf2: #eee6d9;
  --text: #2d251c;
  --muted: #5f5141;
  --orange: #8f410b;
  --osoft: rgba(220, 123, 41, .16);
  --brd: rgba(39, 35, 30, .16);
  --brdh: rgba(39, 35, 30, .32);
  --action-bg: #ffaa00;
  --action-ink: #35200e;
  --secondary-action: #d9e4d1;
  --secondary-ink: #203514;
  --sticker-bg: #e3eadb;
  --section-accent: #7b380c;
  --section-surface: #eee4d3;
  --horizon-sky: #ef9c73;
  --horizon-sun: #ffff55;
  --horizon-land: #00aa00;
  --status-on: #11653b;
  --status-off: #9f2831;
  --status-maint: #7b4b06;
  --sticker-ring: rgba(61, 95, 43, .18);
  --sticker-shadow: rgba(72, 68, 27, .20);
}

.sunset-home.eve {
  --bg: #221c1b;
  --surf: #2d2524;
  --surf2: #3b302c;
  --sticker-bg: #3a3b2e;
  --section-surface: #3c302c;
  --horizon-sky: #b26467;
  --brd: rgba(243, 238, 230, .14);
  --osoft: rgba(255, 177, 79, .16);
}

body.sunset-home .nav {
  background: var(--surf);
  border-bottom-color: var(--action-bg);
  box-shadow: none;
}

body.sunset-home .logo-txt {
  background: none;
  color: var(--section-accent);
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
  letter-spacing: .04em;
}
.sunset-home .logo-sun circle { fill: var(--section-accent); }
.sunset-home .logo-sun g { stroke: var(--section-accent); }

.sunset-home .srv-name,
.sunset-home .srv-block-title {
  font-family: "Press Start 2P", 'JetBrains Mono', monospace;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  text-shadow: none;
  overflow-wrap: anywhere;
}
.sunset-home .srv-name { font-size: 10px; }
.sunset-home .srv-block-title {
  font-size: clamp(15px, 2.4vw, 22px);
  color: var(--section-accent);
}

.sunset-home .srv-info:has(.sdot) .srv-row {
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.sunset-home .srv-info #srvSt {
  font-weight: 700;
  color: var(--status-on);
}
.sunset-home .srv-info:has(.sdot.off) #srvSt { color: var(--status-off); }
.sunset-home .srv-info:has(.sdot.mnt) #srvSt { color: var(--status-maint); }

.sunset-home .page {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 288px);
  gap: 32px;
  padding-bottom: 40px;
}

.sunset-home .feed-hd {
  margin-bottom: 20px;
  padding: 16px;
  padding-inline-start: 20px;
  border-radius: 6px;
  background: var(--sunrise-stripe) left / 4px 100% no-repeat var(--section-surface);
  align-items: baseline;
}

.theme-preview {
  position: relative;
  align-self: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
  z-index: 110;
}
.theme-preview summary {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}
.theme-preview summary::-webkit-details-marker { display: none; }
.theme-preview summary:hover,
.theme-preview[open] summary { border-color: var(--action-bg); }
.theme-preview summary:focus-visible { outline: 2px solid var(--orange); }
.theme-preview-notice {
  position: absolute;
  inset-block-end: calc(100% - 3px);
  inset-inline-end: -4px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  background: var(--action-bg);
  color: var(--action-ink);
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  animation: theme-hint-float 1.8s ease-in-out infinite;
}
.theme-preview-notice[hidden] { display: none; }
.theme-preview-notice strong { font: 900 16px/1 monospace; }
@keyframes theme-hint-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.theme-preview-notice::after {
  content: "";
  position: absolute;
  top: 100%;
  inset-inline-end: 16px;
  border: 4px solid transparent;
  border-top-color: var(--action-bg);
}
.theme-preview-scene {
  display: block;
  width: 48px;
  height: 32px;
  background:
    linear-gradient(var(--horizon-land), var(--horizon-land)) 0 100% / 100% 8px no-repeat,
    linear-gradient(var(--horizon-land), var(--horizon-land)) 0 75% / 12px 8px no-repeat,
    linear-gradient(var(--horizon-sun), var(--horizon-sun)) 64% 40% / 16px 16px no-repeat,
    var(--horizon-sky);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, 44px 0, 44px 4px, 100% 4px, 100% 100%, 0 100%);
}

.theme-preview-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 188px;
  padding: 8px;
  background: var(--surf);
  border: 1px solid var(--brdh);
  border-radius: 8px;
}
.theme-preview-options button {
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--brd);
  border-radius: 6px;
  background: var(--surf2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.theme-preview-label {
  grid-column: 1 / -1;
  padding: 2px 2px 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.theme-preview-options button[aria-pressed="true"] {
  background: var(--action-bg);
  color: var(--action-ink);
}

.sunset-home .feed-title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.sunset-home .feed-cnt {
  border-radius: 6px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
  color: var(--action-ink);
  background: var(--action-bg);
  border-color: transparent;
}

.sunset-home .post {
  padding: 24px;
  padding-inline-start: 28px;
  border-radius: 8px;
}

.sunset-home .ptitle {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.2;
}

.sunset-home .pbody {
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.sunset-home .post:hover,
.sunset-home .srv-card:hover {
  box-shadow: none;
}

.sunset-home .about-panel {
  background: color-mix(in srgb, var(--surf) 94%, var(--about-panel-bg, var(--surf)));
  border-radius: 8px;
  box-shadow: none;
}

.sunset-home .about-panel .ph {
  padding: 16px 20px;
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--section-accent);
  background: var(--section-surface);
}

.sunset-home .about-panel .pb { padding: 0 20px 8px; }
.sunset-home .about-panel .arow { padding-block: 12px; }
.sunset-home .about-panel .arow > div {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}
.sunset-home .about-panel .val {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sunset-home .about-panel .lb { font-size: 13px; }
.sunset-home .about-panel .ic { display: none; }
.sunset-home .page { z-index: auto; }
.sunset-home .rcol { z-index: 101; }
.sunset-home .support-link {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  margin-top: 12px;
  padding: 8px;
  background: var(--surf);
  color: var(--text);
  border: 1px solid var(--brd);
  border-radius: 6px;
  text-align: center;
}
.sunset-home .support-link:hover { border-color: var(--orange); }
.sunset-home .nav .disc,
.sunset-home .fab-sticker,
.sunset-home .srv-modpack-btn,
.sunset-home .srv-ip-box {
  border-radius: 6px;
  box-shadow: none;
  background: var(--surf);
  border: 1px solid var(--brdh);
  color: var(--text);
}
.sunset-home .fab-sticker {
  z-index: 100;
  width: 48px;
  height: 48px;
  justify-content: center;
  padding: 0;
  font-size: 17px;
}
.magnet-toast {
  position: fixed;
  right: 24px;
  bottom: 146px;
  z-index: 156;
  max-width: calc(100vw - 48px);
  pointer-events: none;
}
.magnet-toast:not(:empty) {
  padding: 10px 14px;
  border: 1px solid var(--brdh);
  border-inline-start: 3px solid var(--action-bg);
  border-radius: 6px;
  background: var(--surf);
  color: var(--text);
}
.magnet-form-status:not(:empty) {
  margin-bottom: 12px;
  color: var(--status-off);
}
.sunset-home .nav .disc:hover,
.sunset-home .fab-sticker:hover,
.sunset-home .srv-modpack-btn:hover,
.sunset-home .srv-ip-box:hover {
  color: var(--text);
  border-color: var(--orange);
  background: var(--surf2);
  box-shadow: none;
}

.sunset-home .nav .nav-players-link,
.sunset-home .nav [href="/projects"],
.sunset-home .srv-modpack-btn,
.sunset-home .btn-p {
  background: var(--action-bg);
  color: var(--action-ink);
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
}
.sunset-home #discord-invite-link {
  background: #5865f2;
  color: #fff;
  border-color: transparent;
}
.sunset-home .nav .nav-players-link:hover,
.sunset-home .srv-modpack-btn:hover {
  background: var(--action-bg);
  color: var(--action-ink);
}
.sunset-home .nav .disc:hover,
.sunset-home .srv-modpack-btn:hover,
.sunset-home .btn-p:hover { filter: brightness(1.08); }
.sunset-home .fab-sticker,
.sunset-home .fab-sticker:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.sunset-home .fab-sticker:hover { transform: translateY(-2px); }
.sunset-home .nav [aria-current="page"] { outline: 2px solid var(--action-bg); outline-offset: 2px; }

.sunset-home .sticker { touch-action: none; }
.sunset-home .magnet-edit {
  display: none;
  position: fixed;
  bottom: 34px;
  right: 24px;
  z-index: 155;
  padding: 10px 14px;
  border: 1px solid var(--brdh);
  border-radius: 6px;
  background: var(--secondary-action);
  color: var(--secondary-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sunset-home.admin-mode .magnet-edit { display: block; }
.sunset-home.admin-mode .fab-sticker { bottom: 88px; }
.sunset-home.admin-mode.magnet-editing .sticker-layer { z-index: 120; }
.sunset-home.admin-mode.magnet-editing .sticker { outline: 1px dashed var(--action-bg); }

.sunset-home .players-table-wrap { border-radius: 10px; background: var(--surf); }
.sunset-home .players-table th { background: var(--surf2); color: var(--text); }
.sunset-home .players-search,
.sunset-home .players-filter { background: var(--surf); color: var(--text); border-radius: 8px; }
.sunset-home .players-head h1 { font-size: clamp(28px, 5vw, 44px); }
.sunset-home .players-meta { color: var(--muted); }

.sunset-home .modal-admin { width: min(1100px, 96vw); border-radius: 12px; }
.admin-heading, .admin-sections, .logs-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.admin-heading { justify-content: space-between; margin-bottom: 16px; }
.admin-heading .modal-title { margin: 0; }
.admin-sections { margin-bottom: 20px; }
.admin-sections [aria-pressed="true"],
.sunset-home .modal-admin .tab.on {
  background: var(--secondary-action);
  color: var(--secondary-ink);
  border-radius: 6px;
}
.admin-sections a { text-decoration: none; }
.logs-heading h2 { flex: 1 1 120px; font-size: 16px; }
.sunset-home .bot-logs {
  min-height: 160px;
  height: min(55vh, 520px);
  max-height: none;
  margin-top: 12px;
  background: var(--bg);
  color: var(--text);
  border-color: var(--brdh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.logs-floating {
  position: fixed;
  z-index: 1200;
  width: min(760px, 100vw);
  height: min(460px, 100dvh);
  min-width: min(290px, 100vw);
  min-height: min(200px, 100dvh);
  max-width: 100vw;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--surf);
  border: 1px solid var(--brdh);
  border-radius: 10px;
  overflow: auto;
  resize: both;
}
.logs-floating .bot-logs { flex: 1; min-height: 0; height: auto; }
body:not(.admin-mode) .logs-floating { display: none; }
.logs-grip {
  color: var(--text);
  background: var(--surf2);
  border: 1px solid var(--brdh);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: move;
  touch-action: none;
}
.sunset-home .srv-glow-line { background: var(--brd); box-shadow: none; }
.sunset-home #bgC { opacity: .64; }
.sunset-home.day #bgC { opacity: .55; }

.sunset-home a:focus-visible,
.sunset-home button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .sunset-home .rcol { position: relative; top: auto; }
  .sunset-home .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-inline: 16px;
  }
}

@media (max-width: 600px) {
  .sunset-home { --nav-h: 112px; }

  body.sunset-home .nav { padding-inline: 16px; }
  .sunset-home .nav-l { flex-wrap: wrap; gap: 8px 12px; }
  .sunset-home .nav-sep { display: none; }
  .sunset-home .srv-info { order: 1; flex-basis: 100%; }
  .sunset-home .nav-r { margin-inline-start: 8px; flex-shrink: 0; }
  .sunset-home .clk-time { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-preview-notice { animation: none; }
  .sunset-home #bgC { display: none; }
  .sunset-home,
  .sunset-home .post,
  body.sunset-home .nav {
    transition: none;
  }
}
