:root {
  color-scheme: dark;
  --bezel: #030503;
  --bg: #101210;
  --surface: rgba(12, 16, 11, 0.86);
  --surface-alt: rgba(17, 22, 16, 0.9);
  --text: #c5c7be;
  --title: #a0aa65;
  --command: #a5b16c;
  --command-bright: #b7c376;
  --system: #80a59d;
  --muted: #929990;
  --warning: #b5a16a;
  --error: #ca9387;
  --edge: #2b3228;
  --edge-dim: #232a20;
  --thumb: #4f5948;
  --glow: -0.45px 0 rgba(204, 121, 107, 0.28), 0.5px 0 rgba(98, 170, 164, 0.32),
          0 0 5px color-mix(in srgb, currentColor 28%, transparent);
  --font: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-family: var(--font);
  line-height: 1.5;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--thumb) transparent;
}

html {
  background: var(--bezel);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 48% 36%, #21271d 0%, #151912 44%, #0b0e0a 78%, #050705 100%);
  background-attachment: fixed;
  color: var(--text);
  font: 500 15px/1.55 var(--font);
  letter-spacing: 0.035em;
  text-shadow: var(--glow);
  position: relative;
}

/* Scanlines & subtle aperture grille (0ladushek.pro CRT aesthetic) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.34) 2px 3px, rgba(0, 0, 0, 0.1) 3px 4px),
    repeating-linear-gradient(to right, transparent 0 2px, rgba(3, 6, 3, 0.22) 2px 3px);
  background-size: 100% 4px, 3px 100%;
  opacity: 0.65;
}

/* Curved CRT tube shadow, glass vignette & top-left specular sheen */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 91;
  background:
    radial-gradient(ellipse 46% 32% at 24% 12%, rgba(214, 226, 192, 0.045), transparent 70%),
    linear-gradient(147deg, rgba(173, 188, 163, 0.08) 0%, rgba(149, 167, 137, 0.025) 14%, transparent 36%, transparent 80%, rgba(162, 178, 139, 0.045) 100%),
    radial-gradient(ellipse 80% 78% at 50% 48%, transparent 52%, rgba(0, 0, 0, 0.56) 100%);
  box-shadow:
    inset 0 0 56px 10px rgba(0, 0, 0, 0.68),
    inset 0 0 0 2px #0b1009,
    inset 0 1px 0 rgba(180, 195, 150, 0.2);
}

/* Gentle CRT refresh sweep bar */
.crt-sweep {
  position: fixed;
  left: 0;
  right: 0;
  top: -16vh;
  height: 14vh;
  pointer-events: none;
  z-index: 92;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(157, 183, 137, 0.025) 28%,
    rgba(202, 222, 180, 0.095) 50%,
    rgba(157, 183, 137, 0.02) 72%,
    transparent 100%
  );
  animation: crt-refresh 6.2s linear infinite;
}

@keyframes crt-refresh {
  from { transform: translateY(0); }
  to { transform: translateY(132vh); }
}

@media (prefers-reduced-motion: reduce) {
  .crt-sweep { display: none; }
}

::selection {
  background: var(--text);
  color: #0a0c08;
  text-shadow: none;
}

a {
  color: var(--command);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: background-color 80ms linear, color 80ms linear;
}

a:hover {
  background: var(--command);
  color: #0b0e08;
  text-decoration: none;
  text-shadow: none;
}

:focus-visible {
  outline: 1px dashed var(--system);
  outline-offset: 2px;
}

button, input, select {
  font: inherit;
  letter-spacing: inherit;
}

button {
  border: 1px solid var(--command);
  border-radius: 2px;
  background: rgba(11, 14, 9, 0.85);
  color: var(--command);
  padding: 0.55rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-shadow: var(--glow);
  transition: background-color 80ms linear, color 80ms linear;
}

button:hover {
  background: var(--command);
  color: #0b0e08;
  text-shadow: none;
}

input, select {
  width: 100%;
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: #080b07;
  color: var(--command-bright);
  padding: 0.52rem 0.68rem;
  min-height: 2.55rem;
  text-shadow: var(--glow);
}

input:focus, select:focus {
  border-color: var(--system);
  outline: none;
}

input[type=search]::placeholder,
input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

label {
  display: grid;
  gap: 0.28rem;
  color: var(--system);
  font-size: 0.84rem;
}

.shell {
  width: min(1160px, calc(100% - 3rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.mast {
  position: relative;
  z-index: 40;
  background: rgba(8, 11, 7, 0.92);
  border-bottom: 1px solid var(--edge);
  box-shadow: 0 4px 14px -8px #000;
}

.mast-inner {
  z-index: 40;
  min-height: 3.7rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
}

.brand {
  color: var(--title);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.1rem 0.25rem;
}

.brand::before {
  content: "operator> ";
  color: var(--command);
}

.brand strong {
  color: var(--system);
  font-weight: 700;
}

.brand:hover,
.brand:hover strong,
.brand:hover::before {
  color: #0b0e08;
}

.mast nav, .tabs, .pagination, .account {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.mast nav a, .tabs a {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.16rem 0.35rem;
  text-decoration: none;
}

.mast nav a:hover, .tabs a:hover {
  background: var(--command);
  color: #0b0e08;
}

.mast nav [aria-current], .tabs [aria-current] {
  color: #0b0e08;
  background: var(--command);
  text-shadow: none;
  font-weight: 700;
}

.account {
  margin-left: auto;
  color: var(--system);
  font-size: 0.86rem;
}

.quiet {
  color: var(--muted);
  border: 1px solid var(--edge);
  background: transparent;
  padding: 0.22rem 0.55rem;
  font-weight: 500;
}

.quiet:hover {
  background: var(--command);
  border-color: var(--command);
  color: #0b0e08;
}

main {
  min-height: 74vh;
  padding: 2rem 0 3.5rem;
}

footer {
  border-top: 1px solid var(--edge-dim);
  padding: 1.15rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.84rem;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  color: var(--title);
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

h2 {
  color: var(--system);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: 0.98rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

small {
  font-size: 0.84rem;
  color: var(--muted);
}

p + form, .heading p, p + p {
  margin-top: 0.75rem;
}

.heading {
  margin-bottom: 1.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--edge);
}

.heading p, .hero p {
  color: var(--muted);
  max-width: 72ch;
}

.hero {
  padding: clamp(1.25rem, 3.2vw, 2.1rem);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(180, 195, 150, 0.08);
}

.hero h1::before {
  content: "> ";
  color: var(--command);
}

.hero p {
  margin-top: 0.7rem;
}

.hero .search {
  max-width: 48rem;
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.search {
  display: flex;
  align-items: end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.search label:first-child {
  flex: 1 1 17rem;
}

.search label {
  flex: 0 1 10.5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.4rem;
}

.stat, .card, .panel, .list {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(180, 195, 150, 0.06);
}

.stat {
  padding: 0.85rem 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: block;
}

.stat strong {
  display: block;
  color: var(--title);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--system);
  font-size: 0.84rem;
}

.stat:hover {
  background: var(--command);
  border-color: var(--command);
  color: #0b0e08;
}

.stat:hover strong,
.stat:hover span {
  color: #0b0e08;
  text-shadow: none;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.85rem 0 0.75rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.65rem;
}

.card {
  padding: 0.9rem 1rem;
  min-width: 0;
}

.card h3 {
  margin: 0.25rem 0;
}

.card p {
  margin: 0.28rem 0 0.55rem;
  color: var(--muted);
  max-height: 6.2rem;
  overflow: hidden;
}

.type {
  font-size: 0.8rem;
  color: var(--system);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel {
  padding: 0.95rem 1.1rem;
}

.empty {
  color: var(--muted);
}

.error {
  color: var(--error);
  font-weight: 700;
}

.login {
  max-width: 30rem;
  margin: 7vh auto;
}

.login form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.login h1::before {
  content: "auth> ";
  color: var(--command);
}

.list {
  overflow: hidden;
}

.list-row {
  padding: 0.72rem 0.95rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: start;
  min-width: 0;
}

.list-row + .list-row,
.list > details,
.profile-entry + .profile-entry {
  border-top: 1px solid var(--edge-dim);
}

.list-row small, .list-row code {
  display: block;
  overflow-wrap: anywhere;
}

.list-row time {
  font-variant-numeric: tabular-nums;
  color: var(--system);
  overflow-wrap: anywhere;
}

.list-row strong {
  overflow-wrap: anywhere;
}

code {
  color: var(--system);
  background: rgba(8, 11, 7, 0.7);
  padding: 0.05rem 0.28rem;
  border: 1px solid var(--edge-dim);
  border-radius: 2px;
}

.pagination {
  margin: 1rem 0;
  color: var(--muted);
}

.tab, .tag, .count {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--system);
}

.tag {
  padding: 0.12rem 0.48rem;
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: #0b0e09;
  margin: 0.12rem 0.22rem 0.12rem 0;
}

.tabs {
  margin: 1.1rem 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--edge);
}

.dates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.8rem;
}

.dates strong {
  display: block;
  color: var(--title);
}

.profile-entry h3 {
  padding: 0.6rem 0.95rem 0;
}

.fragment, .book-text, .sign div {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

mark {
  color: #0b0e08;
  background: var(--command);
  text-shadow: none;
  padding: 0 0.12rem;
}

main section + section,
main .panel + .panel,
main .panel + section,
main section + .panel {
  margin-top: 1.2rem;
}

main section h2 {
  margin-bottom: 0.65rem;
}

ul {
  margin: 0.45rem 0 0;
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.28rem;
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(10rem, auto) 1fr;
  gap: 0.4rem 1.2rem;
}

dt {
  color: var(--system);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

details {
  padding: 0.6rem 0.95rem;
  color: var(--muted);
}

summary {
  cursor: pointer;
  color: var(--command);
}

pre {
  padding: 0.9rem;
  background: #080b07;
  border: 1px solid var(--edge);
  border-radius: 2px;
  overflow: auto;
  max-height: 35rem;
  color: var(--text);
  text-shadow: none;
}

/* Readable in-game Minecraft book & sign cards framed for CRT */
.book {
  max-width: 48rem;
  padding: clamp(1.2rem, 3.6vw, 2.2rem);
  background: #d5c7a3;
  color: #241b10;
  border: 1px solid var(--warning);
  border-radius: 2px;
  box-shadow: inset 0 0 2rem rgba(90, 68, 36, 0.38);
  margin-top: 1rem;
  text-shadow: none;
}

.book a, .book .pagination {
  color: #3d2c16;
}

.book a:hover {
  background: #3d2c16;
  color: #f4ebd2;
}

.book-text {
  min-height: 15rem;
  font: 1.1rem/1.6 Georgia, serif;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.signs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}

.signs .sign {
  margin: 0;
  padding: 1.15rem;
  background: repeating-linear-gradient(3deg, #3e2e1d, #3e2e1d 4px, #443220 6px, #443220 9px);
  border: 1px solid var(--edge);
  border-radius: 2px;
  min-width: min(100%, 19rem);
  text-align: center;
  text-shadow: none;
}

.sign small {
  color: #ead7b4;
}

.sign div {
  font-weight: 700;
  color: #fff4d6;
}

.mc-bold { font-weight: bold; }
.mc-italic { font-style: italic; }
.mc-underlined { text-decoration: underline; }
.mc-strikethrough { text-decoration: line-through; }
.mc-obfuscated { letter-spacing: 0.08em; opacity: 0.72; filter: blur(0.45px); }
.mc-black { color: #111; }
.mc-dark_blue { color: #00008b; }
.mc-dark_green { color: #006400; }
.mc-dark_aqua { color: #006b6b; }
.mc-dark_red { color: #8b0000; }
.mc-dark_purple { color: #6e006e; }
.mc-gold { color: #9c5600; }
.mc-gray { color: #525252; }
.mc-dark_gray { color: #363636; }
.mc-blue { color: #2b44c4; }
.mc-green { color: #1f7a1f; }
.mc-aqua { color: #0b6e78; }
.mc-red { color: #b81d1d; }
.mc-light_purple { color: #a32cc4; }
.mc-yellow { color: #7d5c00; }
.mc-white { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55); }

/* Brighter Minecraft colors on dark CRT cards & oak signs */
.card .mc-black, .sign .mc-black { color: #8d9384; }
.card .mc-dark_blue, .sign .mc-dark_blue { color: #6c8cff; }
.card .mc-dark_green, .sign .mc-dark_green { color: #4ec44e; }
.card .mc-dark_aqua, .sign .mc-dark_aqua { color: #3dc5c5; }
.card .mc-dark_red, .sign .mc-dark_red { color: #e05252; }
.card .mc-dark_purple, .sign .mc-dark_purple { color: #c77dff; }
.card .mc-gold, .sign .mc-gold { color: #ffaa00; }
.card .mc-gray, .sign .mc-gray { color: #b8bdb0; }
.card .mc-dark_gray, .sign .mc-dark_gray { color: #8c9284; }
.card .mc-blue, .sign .mc-blue { color: #6ea8ff; }
.card .mc-green, .sign .mc-green { color: #6aff6a; }
.card .mc-aqua, .sign .mc-aqua { color: #55ffff; }
.card .mc-red, .sign .mc-red { color: #ff6b6b; }
.card .mc-light_purple, .sign .mc-light_purple { color: #ff7aff; }
.card .mc-yellow, .sign .mc-yellow { color: #ffff55; }
.card .mc-white, .sign .mc-white { color: #ffffff; }

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 0.55rem 0.9rem 0.55rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid var(--edge-dim);
  font-variant-numeric: tabular-nums;
}

.table th {
  color: var(--system);
  font-weight: 700;
  border-bottom: 1px solid var(--edge);
}

.table tbody tr:hover {
  background: rgba(165, 177, 108, 0.08);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 20rem) 2.5rem;
  align-items: center;
  gap: 0.6rem;
}

.activity-row meter {
  width: 100%;
  height: 0.85rem;
  accent-color: var(--command);
}

@media (max-width: 768px) {
  .shell {
    width: calc(100% - 1.5rem);
  }
  .mast-inner {
    gap: 0.55rem 0.75rem;
    min-height: 0;
    padding: 0.55rem 0 0.45rem;
  }
  .brand {
    font-size: 0.98rem;
  }
  .account {
    gap: 0.45rem;
    font-size: 0.82rem;
  }
  .mast nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding: 0.2rem 0 0.3rem;
    margin-top: 0.1rem;
    border-top: 1px solid var(--edge-dim);
  }
  .mast nav::-webkit-scrollbar {
    display: none;
  }
  .mast nav a {
    flex: none;
    white-space: nowrap;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.62rem;
    border: 1px solid var(--edge-dim);
    border-radius: 2px;
    font-size: 0.86rem;
    touch-action: manipulation;
  }
  .mast nav [aria-current] {
    border-color: var(--command);
  }
  main {
    padding: 1.15rem 0 calc(2.5rem + env(safe-area-inset-bottom));
  }
  .hero {
    padding: 1rem;
  }
  .search {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: end;
  }
  .search label:first-child {
    grid-column: 1 / -1;
  }
  .search button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
  input, select, textarea, button {
    font-size: 16px;
    touch-action: manipulation;
  }
  input:not([type="checkbox"]):not([type="range"]), select {
    min-height: 44px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .stat {
    padding: 0.72rem 0.8rem;
  }
  .stat strong {
    font-size: clamp(1.12rem, 5vw, 1.38rem);
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tabs a {
    flex: none;
    white-space: nowrap;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--edge-dim);
  }
  .pagination {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.55rem;
  }
  .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--edge);
    text-decoration: none;
  }
  .list-row {
    flex-wrap: wrap;
    padding: 0.75rem 0.85rem;
  }
  dl {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
  }
  .table th, .table td {
    padding: 0.48rem 0.65rem 0.48rem 0.35rem;
    font-size: 0.86rem;
  }
  .activity-row {
    grid-template-columns: 4.8rem minmax(0, 1fr) 2.2rem;
    gap: 0.45rem;
  }
  .login {
    margin-top: 1.2rem;
    padding: 1.15rem;
  }
  .login button[type="submit"] {
    width: 100%;
    min-height: 44px;
  }
  footer {
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .shell {
    width: calc(100% - 1.1rem);
  }
  .brand::before {
    content: "> ";
  }
  .account > span {
    display: none;
  }
  .fx-btn, .quiet {
    min-height: 36px;
    padding: 0.25rem 0.55rem;
    font-size: 0.8rem;
  }
  .fx-popover {
    position: fixed;
    top: 3.4rem;
    right: 0.55rem;
    left: 0.55rem;
    width: auto;
    max-width: 22rem;
    margin-left: auto;
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }
  .fx-check {
    min-height: 34px;
    font-size: 0.9rem;
  }
  .fx-check input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
  }
  .fx-range {
    height: 1.6rem;
  }
  .search {
    grid-template-columns: 1fr;
  }
}

/* --- Source / CRT terminal animations & FX controls --- */
.brand strong::after {
  content: "█";
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--command);
  font-size: 0.88em;
  animation: cursor-blink 1.05s steps(2, start) infinite;
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

main.shell {
  animation: crt-reveal 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes crt-reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
    filter: brightness(1.18);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

.reveal {
  animation: row-in 240ms cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error {
  animation: deny-shake 320ms ease-out;
}

@keyframes deny-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-3px); }
  85% { transform: translateX(2px); }
}

.stat,
.card,
.list-row,
.mast nav a,
.tabs a,
button {
  transition: background-color 110ms ease, border-color 110ms ease, color 110ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.card:hover,
.list-row:hover {
  border-color: var(--command);
  box-shadow: 0 0 14px rgba(182, 200, 126, 0.14), inset 0 1px 0 rgba(180, 195, 150, 0.12);
}

button:active,
.mast nav a:active,
.stat:active,
.fx-btn:active {
  transform: translateY(1px);
}

body.is-navigating main.shell {
  opacity: 0.72;
  transition: opacity 120ms ease;
}

.fx-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fx-btn {
  padding: 0.25rem 0.58rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  background: transparent;
  color: var(--command);
  border: 1px solid var(--edge);
  border-radius: 2px;
  cursor: pointer;
}

.fx-btn:hover,
.fx-btn.is-open {
  background: var(--command);
  border-color: var(--command);
  color: #0b0e08;
  text-shadow: none;
}

.fx-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  width: 15.5rem;
  padding: 0.75rem 0.85rem;
  background: #0d100a;
  border: 1px solid var(--command);
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72), 0 0 18px rgba(182, 200, 126, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fx-popover[hidden] {
  display: none;
}

.fx-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text);
  cursor: pointer;
}

.fx-check input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: var(--command);
  cursor: pointer;
}

.fx-range-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0.1rem;
}

.fx-range-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--muted);
}

.fx-range-head output {
  color: var(--command);
  font-variant-numeric: tabular-nums;
}

.fx-range {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  accent-color: var(--command);
  cursor: pointer;
}

.fx-reset {
  align-self: flex-start;
  margin-top: 0.15rem;
  color: var(--muted);
  border-color: var(--edge-dim);
}

.notice {
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--command);
  background: rgba(165, 177, 108, 0.12);
  color: var(--title);
  border-radius: 2px;
}

.admin-create {
  margin-bottom: 1.25rem;
}

.admin-create h2 {
  margin-bottom: 0.75rem;
}

.admin-user-row {
  gap: 0.85rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-pw-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.admin-pw-form input {
  width: 11.5rem;
  min-height: 2.05rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.86rem;
}

.quiet.danger {
  border-color: rgba(210, 106, 84, 0.6);
  color: #e29b8a;
}

.quiet.danger:hover {
  background: #c85c48;
  border-color: #c85c48;
  color: #0b0e08;
}

@media (max-width: 680px) {
  .admin-actions, .admin-pw-form {
    width: 100%;
  }
  .admin-pw-form input {
    flex: 1 1 9rem;
    min-height: 40px;
  }
}

html[data-fx="off"] .crt-sweep,
html[data-fx="off"] .brand strong::after {
  animation: none;
}

html[data-fx="off"] .crt-sweep {
  display: none;
}

html[data-fx="off"] main.shell,
html[data-fx="off"] .reveal,
html[data-fx="off"] .error {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .crt-sweep,
  .brand strong::after,
  main.shell,
  .reveal,
  .error {
    animation: none !important;
  }
}
