:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #e8e1d3;
  --white: #fffdf8;
  --ink: #14251e;
  --ink-soft: #526159;
  --line: #d8d1c4;
  --green: #176a4b;
  --green-dark: #0d402e;
  --green-soft: #d9ebdc;
  --lime: #d6ef6b;
  --lime-deep: #aac93f;
  --coral: #eb6b4d;
  --sand: #e9d6b4;
  --blue: #3d6e79;
  --danger: #b63d32;
  --shadow: 0 20px 60px rgba(30, 43, 35, 0.09);
  --shadow-soft: 0 10px 30px rgba(30, 43, 35, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --rail-width: 238px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(214, 239, 107, 0.26), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 28px 28px, auto;
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(23, 106, 75, 0.22);
  outline-offset: 2px;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  padding: 28px 18px 22px;
  overflow-y: auto;
  color: #f5f7f0;
  background:
    radial-gradient(circle at 30% 8%, rgba(214, 239, 107, 0.12), transparent 10rem),
    linear-gradient(180deg, #102b21 0%, #0b211a 100%);
  box-shadow: 14px 0 45px rgba(10, 32, 24, 0.14);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 30px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(214, 239, 107, 0.35);
  border-radius: 13px;
  transform: rotate(-6deg);
}

.brand-mark span {
  position: absolute;
  width: 4px;
  border-radius: 4px;
  background: var(--lime);
}

.brand-mark span:nth-child(1) {
  height: 10px;
  transform: translate(-7px, 5px);
}

.brand-mark span:nth-child(2) {
  height: 21px;
}

.brand-mark span:nth-child(3) {
  height: 15px;
  transform: translate(7px, 2px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 7px;
  color: #95ad9f;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  min-height: 50px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #9eb3a7;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover {
  color: #f4f7f2;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.is-active {
  color: #102b21;
  background: var(--lime);
  box-shadow: 0 10px 24px rgba(8, 28, 20, 0.2);
}

.nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.nav-count {
  min-width: 23px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #102b21;
  background: rgba(255, 255, 255, 0.55);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-align: center;
}

.rail-note {
  display: flex;
  gap: 11px;
  margin-top: auto;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.rail-note strong,
.rail-note small {
  display: block;
}

.rail-note strong {
  margin-bottom: 4px;
  font-size: 11px;
}

.rail-note small {
  color: #8ba196;
  font-size: 9px;
  line-height: 1.5;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(214, 239, 107, 0.08);
  animation: breathe 2.3s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 8px rgba(214, 239, 107, 0.02);
  }
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 12px;
  color: #849a8e;
  font-size: 11px;
  text-decoration: none;
}

.back-link:hover {
  color: white;
}

.back-link svg {
  width: 16px;
}

.main-stage {
  min-width: 0;
  grid-column: 2;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 4vw, 58px);
  border-bottom: 1px solid rgba(173, 164, 149, 0.42);
  background: rgba(244, 240, 231, 0.88);
  backdrop-filter: blur(18px);
}

.page-heading h1 {
  margin: 2px 0 3px;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.045em;
}

.page-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.eyebrow,
.section-kicker,
.dialog-kicker {
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.17em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.last-sync {
  margin-right: 5px;
  color: #7c867f;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.65);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: #a9b9ae;
  background: var(--white);
  transform: translateY(-1px);
}

.profile-chip {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 5px 11px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.62);
  cursor: pointer;
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--lime);
  background: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.profile-chip strong,
.profile-chip small {
  display: block;
  text-align: left;
}

.profile-chip strong {
  font-size: 10px;
}

.profile-chip small {
  margin-top: 2px;
  color: #879088;
  font-size: 8px;
}

.mobile-brand {
  display: none;
}

.view-panel {
  display: none;
  padding: 34px clamp(24px, 4vw, 58px) 60px;
  animation: reveal 260ms ease both;
}

.view-panel.is-active {
  display: block;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.hero-strip {
  position: relative;
  display: grid;
  min-height: 305px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: white;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--green-dark);
  box-shadow: var(--shadow);
}

.hero-strip::before {
  position: absolute;
  width: 340px;
  height: 340px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  transform: translate(-48%, 58%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 45px clamp(30px, 5vw, 70px);
}

.hero-copy .section-kicker {
  color: var(--lime);
}

.hero-copy h2 {
  max-width: 640px;
  margin: 11px 0 13px;
  font-size: clamp(31px, 4vw, 51px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy h2 em {
  color: var(--lime);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-copy p {
  max-width: 550px;
  margin: 0 0 25px;
  color: #b6c8bd;
  font-size: 12px;
}

.primary-button,
.secondary-button,
.publish-button,
.text-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: 170ms ease;
}

.primary-button {
  border: 1px solid var(--lime);
  color: var(--green-dark);
  background: var(--lime);
  box-shadow: 0 9px 22px rgba(6, 25, 18, 0.18);
}

.primary-button:hover {
  background: #e2f68e;
  transform: translateY(-1px);
}

.primary-button svg {
  width: 16px;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.secondary-button:hover {
  border-color: #9fac9f;
}

.publish-button {
  border: 1px solid var(--green);
  color: white;
  background: var(--green);
}

.publish-button:hover:not(:disabled) {
  background: var(--green-dark);
}

.publish-button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
}

.hero-orbit {
  position: relative;
  min-height: 305px;
  overflow: hidden;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(214, 239, 107, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: 275px;
  height: 275px;
}

.orbit-two {
  width: 190px;
  height: 190px;
  border-style: dashed;
  animation: orbitSpin 24s linear infinite;
}

@keyframes orbitSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 128px;
  height: 128px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 38% 62% 55% 45%;
  color: var(--green-dark);
  background: var(--lime);
  box-shadow: 0 25px 70px rgba(3, 19, 13, 0.32);
  text-align: center;
  transform: translate(-50%, -50%) rotate(7deg);
}

.orbit-core span,
.orbit-core small {
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.orbit-core strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.orbit-label {
  position: absolute;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: #c7d8cd;
  background: rgba(5, 30, 21, 0.52);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.label-a {
  top: 19%;
  left: 22%;
}

.label-b {
  top: 40%;
  right: 10%;
}

.label-c {
  bottom: 17%;
  left: 25%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.metric-card {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  padding: 23px;
  border: 1px solid rgba(90, 96, 87, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.metric-card::after {
  position: absolute;
  right: -26px;
  bottom: -45px;
  width: 105px;
  height: 105px;
  content: "";
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.13;
}

.metric-card strong {
  display: block;
  margin: 15px 0 4px;
  font-family: "DM Mono", monospace;
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.07em;
}

.metric-card small {
  color: inherit;
  font-size: 9px;
  opacity: 0.68;
}

.metric-label {
  font-size: 10px;
  font-weight: 800;
}

.metric-ink {
  color: white;
  background: var(--ink);
}

.metric-lime {
  color: var(--green-dark);
  background: var(--lime);
}

.metric-sand {
  background: var(--sand);
}

.metric-white {
  background: var(--white);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: 15px;
}

.overview-grid {
  margin-top: 15px;
}

.surface {
  border: 1px solid rgba(170, 161, 145, 0.44);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow-soft);
}

.surface-head {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.45);
}

.surface-head h3 {
  margin: 4px 0 0;
  font-size: 17px;
  letter-spacing: -0.04em;
}

.template-list,
.room-pulse-list {
  padding: 7px 12px 13px;
}

.template-row {
  display: grid;
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.32);
}

.template-row:last-child {
  border-bottom: 0;
}

.template-ident {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.template-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c9d3c8;
  border-radius: 13px;
  color: var(--green);
  background: #eef2e8;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.template-ident strong,
.template-ident small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-ident strong {
  font-size: 11px;
}

.template-ident small {
  margin-top: 4px;
  color: #7d877f;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.status-pill,
.mode-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.status-pill.status-published,
.status-pill.status-live {
  color: #0b5639;
  background: #d9f0dc;
}

.status-pill.status-draft,
.status-pill.status-countdown,
.status-pill.status-full {
  color: #72500c;
  background: #f6e7ba;
}

.status-pill.status-retired,
.status-pill.status-cancelled,
.status-pill.status-expired {
  color: #814339;
  background: #f5ddd7;
}

.status-pill.status-lobby {
  color: #335e68;
  background: #dcecef;
}

.status-pill.status-finished {
  color: #505c54;
  background: #e8e9e4;
}

.mode-pill {
  color: #4c5d54;
  background: #ecebe4;
}

.row-menu {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.pulse-room {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px 9px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.32);
  cursor: pointer;
}

.pulse-room:last-child {
  border-bottom: 0;
}

.pulse-room > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8c978f;
}

.pulse-room > i.is-live {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(235, 107, 77, 0.11);
}

.pulse-room strong,
.pulse-room small {
  display: block;
}

.pulse-room strong {
  font-size: 10px;
}

.pulse-room small {
  margin-top: 4px;
  color: #7d877f;
  font-size: 8px;
}

.pulse-room b {
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.status-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7b857e;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.status-key i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.empty-state {
  display: grid;
  place-items: center;
  color: #889089;
  text-align: center;
}

.empty-state.compact {
  min-height: 165px;
}

.empty-state p {
  margin: 9px 0 0;
  font-size: 10px;
}

.empty-glyph {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px dashed #b9b5aa;
  border-radius: 14px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.builder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.segmented-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.72);
}

.segmented-control button {
  min-width: 135px;
  min-height: 45px;
  padding: 5px 15px;
  border: 0;
  border-radius: 11px;
  color: #667169;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.segmented-control button.is-active {
  color: white;
  background: var(--green-dark);
  box-shadow: 0 8px 18px rgba(13, 64, 46, 0.2);
}

.segmented-control button small {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 7px;
  opacity: 0.68;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.builder-layout {
  display: grid;
  grid-template-columns: 220px minmax(470px, 1fr) 280px;
  align-items: start;
  gap: 14px;
}

.builder-library {
  position: sticky;
  top: 122px;
  max-height: calc(100vh - 145px);
  overflow: hidden;
}

.builder-library .surface-head {
  min-height: 70px;
}

.tiny-count {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
}

.search-field svg {
  width: 15px;
  color: #8a928c;
}

.search-field input {
  min-width: 0;
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 9px;
}

.builder-template-list {
  max-height: calc(100vh - 270px);
  padding: 0 9px 12px;
  overflow-y: auto;
}

.library-card {
  margin-bottom: 5px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
}

.library-card:has(.library-item.is-active) {
  border-color: #b8cbb8;
  background: #e8f0e5;
}

.library-item {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.library-item:hover {
  background: #f3f1e9;
}

.library-item.is-active {
  border-color: transparent;
  background: transparent;
}

.library-item strong,
.library-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item strong {
  font-size: 9px;
}

.library-item small {
  margin-top: 5px;
  color: #7e8780;
  font-family: "DM Mono", monospace;
  font-size: 7px;
}

.library-item .library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}

.library-meta span {
  color: #68746c;
  font-size: 7px;
}

.library-quick-actions {
  display: none;
  gap: 4px;
  padding: 0 8px 8px;
}

.library-card:has(.library-item.is-active) .library-quick-actions {
  display: flex;
}

.library-quick-actions button {
  min-height: 25px;
  padding: 0 7px;
  border: 1px solid #bdc9bc;
  border-radius: 7px;
  color: #53645a;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: 6px;
  font-weight: 800;
}

.library-quick-actions button:hover {
  color: var(--green);
  border-color: var(--green);
}

.builder-canvas {
  overflow: hidden;
}

.builder-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: #f7f4ec;
}

.builder-progress span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8b928d;
  font-size: 8px;
  font-weight: 700;
}

.builder-progress span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 74px;
  height: 1px;
  content: "";
  background: #d9d5ca;
}

.builder-progress i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #c9c5ba;
  border-radius: 8px;
  font-family: "DM Mono", monospace;
  font-size: 7px;
  font-style: normal;
}

.builder-progress .is-current {
  color: var(--green);
}

.builder-progress .is-current i {
  color: var(--green-dark);
  border-color: var(--lime-deep);
  background: var(--lime);
}

.form-section {
  padding: 25px 25px 28px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.45);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 21px;
}

.form-section-title > span {
  padding-top: 3px;
  color: var(--green);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.form-section-title h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.035em;
}

.form-section-title p {
  margin: 4px 0 0;
  color: #7b857e;
  font-size: 9px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.choice-group legend {
  color: #5c6961;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #ccc7bc;
  border-radius: 11px;
  color: var(--ink);
  background: #fffefa;
  outline: 0;
  font-size: 10px;
  transition: 160ms ease;
}

.field textarea {
  min-height: 68px;
  padding-top: 11px;
  resize: vertical;
  line-height: 1.5;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #a8b6aa;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 106, 75, 0.09);
}

.mono-input {
  font-family: "DM Mono", monospace !important;
  font-size: 9px !important;
}

.input-unit {
  position: relative;
}

.input-unit input {
  padding-right: 48px;
}

.input-unit b {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #7d877f;
  font-family: "DM Mono", monospace;
  font-size: 7px;
  transform: translateY(-50%);
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-group legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
}

.choice-card {
  position: relative;
  display: flex;
  min-height: 65px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #ccc7bc;
  border-radius: 12px;
  background: #fffefa;
  cursor: pointer;
  transition: 150ms ease;
}

.choice-card:has(input:checked) {
  border-color: var(--green);
  background: #e8f1e7;
  box-shadow: inset 0 0 0 1px rgba(23, 106, 75, 0.12);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  font-size: 9px;
}

.choice-card small {
  margin-top: 4px;
  color: #7b857e;
  font-size: 7px;
}

.choice-visual {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.free-visual {
  color: #245846;
  background: #cde5d1;
}

.signal-visual {
  color: #70491b;
  background: #eeddbd;
}

.rule-contract {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 17px;
  padding: 13px;
  border: 1px solid #bed1bd;
  border-radius: 13px;
  background: #ecf4e9;
}

.contract-check {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--lime);
  background: var(--green);
  font-size: 11px;
}

.rule-contract strong,
.rule-contract p {
  margin: 0;
}

.rule-contract strong {
  display: block;
  font-size: 9px;
}

.rule-contract p {
  margin-top: 3px;
  color: #6e7c72;
  font-size: 8px;
}

.builder-preview {
  position: sticky;
  top: 122px;
}

.preview-sticky {
  padding: 16px;
  border: 1px solid rgba(170, 161, 145, 0.5);
  border-radius: var(--radius-lg);
  background: rgba(235, 229, 217, 0.72);
}

.preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 3px 10px;
  color: #667168;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.preview-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaa99f;
}

.preview-label i.is-valid {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 106, 75, 0.09);
}

.player-room-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  color: white;
  background:
    radial-gradient(circle at 86% 12%, rgba(214, 239, 107, 0.18), transparent 8rem),
    linear-gradient(155deg, #153b2d 0%, #09251b 100%);
  box-shadow: 0 22px 42px rgba(17, 47, 36, 0.23);
}

.player-room-card::after {
  position: absolute;
  right: -30px;
  bottom: 58px;
  width: 90px;
  height: 90px;
  content: "";
  border: 1px solid rgba(214, 239, 107, 0.18);
  border-radius: 50%;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #adc1b5;
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.09em;
}

.preview-emblem {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 22px 0 15px;
  place-items: center;
  border: 1px solid rgba(214, 239, 107, 0.35);
  border-radius: 18px 25px 17px 23px;
  color: var(--green-dark);
  background: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 17px;
  font-weight: 500;
  transform: rotate(-5deg);
}

.player-room-card h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.055em;
}

.player-room-card > p {
  min-height: 32px;
  margin: 6px 0 13px;
  color: #b5c7bc;
  font-size: 8px;
  line-height: 1.5;
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.preview-tags span {
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #c4d2c9;
  background: rgba(255, 255, 255, 0.045);
  font-family: "DM Mono", monospace;
  font-size: 6px;
}

.preview-goal {
  margin: 14px 0;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.preview-goal small,
.preview-goal strong {
  display: block;
}

.preview-goal small,
.preview-economy small {
  color: #859c8e;
  font-family: "DM Mono", monospace;
  font-size: 6px;
  letter-spacing: 0.1em;
}

.preview-goal strong {
  margin-top: 4px;
  color: var(--lime);
  font-size: 11px;
}

.preview-economy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.preview-economy span {
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.preview-economy strong {
  display: block;
  margin-top: 3px;
  font-size: 9px;
}

.player-room-card button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  color: var(--green-dark);
  background: var(--lime);
  font-size: 8px;
  font-weight: 800;
  pointer-events: none;
}

.validation-panel,
.hash-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(170, 161, 145, 0.52);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.68);
}

.validation-panel > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.validation-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #6b716d;
  background: #ddd9cf;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.validation-panel.is-valid .validation-icon {
  color: white;
  background: var(--green);
}

.validation-panel.is-error .validation-icon {
  color: white;
  background: var(--danger);
}

.validation-panel p,
.validation-panel strong,
.validation-panel small {
  display: block;
  margin: 0;
}

.validation-panel strong {
  font-size: 8px;
}

.validation-panel small {
  margin-top: 3px;
  color: #7e8781;
  font-size: 7px;
  line-height: 1.4;
}

.validation-errors {
  margin: 9px 0 0;
  padding: 9px 9px 9px 22px;
  border-radius: 9px;
  color: #7e352e;
  background: #f5e3de;
  font-size: 7px;
  line-height: 1.5;
}

.hash-panel span {
  display: block;
  margin-bottom: 5px;
  color: #7c857f;
  font-family: "DM Mono", monospace;
  font-size: 6px;
  letter-spacing: 0.12em;
}

.hash-panel code {
  display: block;
  overflow: hidden;
  color: #59635c;
  font-family: "DM Mono", monospace;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced-builder {
  min-height: 670px;
  padding: 27px;
}

.advanced-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.advanced-head h3 {
  margin: 5px 0;
  font-size: 18px;
}

.advanced-head p {
  margin: 0;
  color: #79837c;
  font-size: 9px;
}

.code-editor {
  display: grid;
  min-height: 570px;
  grid-template-columns: 38px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #27493d;
  border-radius: 15px;
  background: #10271f;
}

.line-rail {
  padding: 17px 10px;
  color: #527064;
  background: #0b2119;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  line-height: 1.75;
  text-align: right;
  user-select: none;
}

.code-editor textarea {
  width: 100%;
  min-height: 570px;
  padding: 16px;
  border: 0;
  color: #d9eddf;
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.62;
  outline: 0;
  resize: vertical;
  tab-size: 2;
}

.monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-pills button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #69746c;
  background: rgba(255, 253, 248, 0.65);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.filter-pills button.is-active {
  color: white;
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.monitor-surface {
  overflow: hidden;
}

.table-hint {
  color: #7e8781;
  font-size: 8px;
}

.table-wrap {
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.37);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: #737e76;
  background: rgba(242, 238, 228, 0.6);
  font-family: "DM Mono", monospace;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.data-table td {
  font-size: 9px;
}

.data-table tbody tr {
  cursor: pointer;
  transition: 140ms ease;
}

.data-table tbody tr:hover {
  background: #f2f2e9;
}

.table-primary strong,
.table-primary small {
  display: block;
}

.table-primary strong {
  font-size: 9px;
}

.table-primary small {
  margin-top: 4px;
  color: #818a83;
  font-family: "DM Mono", monospace;
  font-size: 7px;
}

.seat-meter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seat-meter span {
  display: block;
  width: 58px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #dddcd4;
}

.seat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.table-empty td {
  height: 220px;
  color: #879089;
  text-align: center;
}

.audit-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
  padding: 20px 5px;
}

.audit-intro h2 {
  max-width: 620px;
  margin: 8px 0;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.07;
  letter-spacing: -0.06em;
}

.audit-intro p {
  margin: 0;
  color: #69756d;
  font-size: 10px;
}

.audit-filter {
  width: 230px;
}

.audit-timeline {
  padding: 14px 25px;
}

.audit-event {
  position: relative;
  display: grid;
  min-height: 76px;
  grid-template-columns: 125px 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(190, 181, 164, 0.38);
}

.audit-event:last-child {
  border-bottom: 0;
}

.audit-time {
  color: #7b857e;
  font-family: "DM Mono", monospace;
  font-size: 7px;
}

.audit-node {
  position: relative;
  width: 9px;
  height: 9px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px #adc2b2;
}

.audit-event strong,
.audit-event small {
  display: block;
}

.audit-event strong {
  font-size: 9px;
}

.audit-event small {
  margin-top: 5px;
  color: #7c867f;
  font-size: 7px;
}

.audit-actor {
  padding: 5px 8px;
  border-radius: 7px;
  color: #58675e;
  background: #e9eae3;
  font-family: "DM Mono", monospace;
  font-size: 7px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(9, 28, 21, 0.35);
  backdrop-filter: blur(3px);
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(560px, 94vw);
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -25px 0 70px rgba(12, 33, 25, 0.2);
  transform: translateX(105%);
  transition: transform 230ms ease;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 95px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.92);
  backdrop-filter: blur(16px);
}

.drawer-head h2 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.drawer-content {
  padding: 20px 25px 45px;
}

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.drawer-stat {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.drawer-stat span,
.drawer-stat strong {
  display: block;
}

.drawer-stat span {
  color: #7e8881;
  font-size: 7px;
}

.drawer-stat strong {
  margin-top: 5px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.drawer-section {
  margin-top: 22px;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 11px;
}

.participant-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}

.seat-badge {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.participant-card strong,
.participant-card small {
  display: block;
}

.participant-card strong {
  font-size: 9px;
}

.participant-card small {
  margin-top: 3px;
  color: #818a83;
  font-size: 7px;
}

.drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.danger-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #dca79e;
  border-radius: 11px;
  color: var(--danger);
  background: #fff4f1;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

dialog {
  border: 0;
}

dialog::backdrop {
  background: rgba(8, 28, 20, 0.45);
  backdrop-filter: blur(5px);
}

.action-dialog,
.login-dialog {
  width: min(440px, calc(100vw - 30px));
  padding: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 90px rgba(10, 32, 24, 0.28);
}

.action-dialog form,
.login-dialog form {
  padding: 27px;
}

.action-dialog h2,
.login-dialog h2 {
  margin: 7px 0;
  font-size: 24px;
  letter-spacing: -0.05em;
}

.action-dialog p,
.login-dialog > form > p {
  margin: 0 0 18px;
  color: #69756d;
  font-size: 9px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.dialog-field-grid {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.login-dialog {
  text-align: left;
}

.login-dialog .field {
  margin-top: 12px;
}

.login-mark {
  margin-bottom: 20px;
  border-color: #a9c5ad;
}

.login-error {
  min-height: 17px;
  margin: 10px 0 0 !important;
  color: var(--danger) !important;
}

.wide {
  width: 100%;
  margin-top: 5px;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  width: min(360px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid #c6cfc5;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
  animation: toastIn 220ms ease both;
}

.toast::before {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  content: "";
  border-radius: 50%;
  background: var(--green);
}

.toast.is-error::before {
  background: var(--danger);
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  font-size: 9px;
}

.toast small {
  margin-top: 4px;
  color: #768078;
  font-size: 8px;
  line-height: 1.45;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.is-loading {
  position: relative;
  pointer-events: none;
}

.is-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  margin: -8px;
  content: "";
  border: 2px solid rgba(20, 37, 30, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading > * {
  opacity: 0.15;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1280px) {
  :root {
    --rail-width: 205px;
  }

  .builder-layout {
    grid-template-columns: 190px minmax(450px, 1fr) 255px;
  }

  .form-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .builder-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .builder-preview {
    position: static;
    grid-column: 2;
  }

  .preview-sticky {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 11px;
  }

  .preview-label {
    grid-column: 1 / -1;
  }

  .player-room-card {
    grid-row: span 2;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .app-shell {
    display: block;
  }

  .side-rail {
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 210ms ease;
  }

  .side-rail.is-open {
    transform: translateX(0);
  }

  .main-stage {
    grid-column: 1;
  }

  .top-bar {
    min-height: 82px;
    padding: 14px 18px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "DM Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .mobile-brand .icon-button {
    display: inline-grid;
  }

  .page-heading,
  .last-sync {
    display: none;
  }

  .view-panel {
    padding: 20px 17px 50px;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .hero-orbit {
    position: absolute;
    inset: auto -55px -50px auto;
    width: 270px;
    opacity: 0.42;
  }

  .hero-copy {
    padding: 40px 27px;
  }

  .hero-copy h2 {
    max-width: 550px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .builder-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-actions {
    justify-content: flex-start;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-library {
    position: static;
    max-height: none;
  }

  .builder-template-list {
    display: flex;
    max-height: none;
    gap: 7px;
    overflow-x: auto;
  }

  .library-item {
    min-width: 175px;
  }

  .builder-preview {
    grid-column: 1;
  }

  .preview-sticky {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .choice-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .top-actions .icon-button,
  .profile-chip small {
    display: none;
  }

  .profile-chip {
    border: 0;
    background: transparent;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric-card {
    min-height: 125px;
    padding: 18px;
  }

  .metric-card strong {
    font-size: 29px;
  }

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

  .template-row .mode-pill {
    display: none;
  }

  .builder-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    min-width: 0;
    flex: 1;
  }

  .builder-progress {
    padding: 13px;
  }

  .builder-progress span {
    justify-content: center;
    font-size: 0;
  }

  .builder-progress span:not(:last-child)::after {
    right: 3px;
    left: 65%;
  }

  .form-section {
    padding: 22px 17px;
  }

  .form-grid.two,
  .form-grid.three,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .choice-group.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choice-group.three .choice-card {
    min-height: 57px;
    justify-content: center;
    padding: 7px 3px;
    text-align: center;
  }

  .choice-group.three .choice-card small {
    display: none;
  }

  .preview-sticky {
    display: block;
  }

  .validation-panel,
  .hash-panel {
    margin-top: 9px;
  }

  .advanced-builder {
    padding: 18px;
  }

  .advanced-head {
    align-items: stretch;
    flex-direction: column;
  }

  .monitor-toolbar,
  .audit-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .filter-pills button {
    flex: 0 0 auto;
  }

  .audit-filter {
    width: 100%;
  }

  .audit-timeline {
    padding: 8px 15px;
  }

  .audit-event {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 0;
  }

  .audit-time {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .audit-node {
    grid-row: 1 / 3;
  }

  .drawer-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
