:root {
  --bg: #f3f5f7;
  --sidebar: #0b141d;
  --sidebar-soft: #121f2b;
  --sidebar-line: #22303d;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #dfe5eb;
  --green: #16a34a;
  --green-soft: #e7f7ec;
  --blue: #0969da;
  --blue-soft: #e8f1ff;
  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --dark-card: #0d1723;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

html,
body {
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

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

.sidebar {
  background: linear-gradient(180deg, #09111a 0%, #0d1924 100%);
  color: #dbe7f1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid #1b2936;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 18px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: #ef3b2d;
  color: #111827;
  font-size: 23px;
  font-weight: 900;
}

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

.brand strong {
  color: #ffffff;
  font-size: 19px;
  line-height: 1.15;
}

.brand small {
  color: #91a3b5;
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  color: #cbd5df;
  font-size: 15px;
  font-weight: 700;
}

.nav a span {
  width: 22px;
  text-align: center;
  color: #d7e0ea;
}

.nav a.active,
.nav a:hover {
  background: #182433;
  color: #ff4b3e;
  box-shadow: inset 3px 0 0 #ef3b2d;
}

.server-info-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #253341;
  border-radius: var(--radius);
  background: rgba(15, 26, 38, 0.96);
}

.server-info-card strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 14px;
}

.server-info-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.server-info-card dt {
  color: #91a3b5;
  font-size: 12px;
}

.server-info-card dd {
  margin: -5px 0 4px;
  color: #ffffff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.logout button {
  width: 100%;
  background: transparent;
  border-color: #263544;
  color: #cbd5df;
}

.content {
  min-width: 0;
  padding: 0 18px 22px;
}

.dashboard-content {
  max-width: 1600px;
}

.topbar {
  min-height: 66px;
  margin: 0 -18px 18px;
  padding: 0 24px;
  background: #0a121c;
  color: #eef4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.menu-button {
  min-width: 42px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  padding: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.online-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #64748b;
}

.online-dot.on {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.top-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.14);
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.flash {
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
}

.flash.success {
  color: var(--green);
  border-color: #a9ddb9;
}

.flash.danger {
  color: var(--red);
  border-color: #fecaca;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 1fr 2.7fr;
  gap: 14px;
  margin-bottom: 14px;
}

.connection-strip {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(260px, 1.4fr) minmax(230px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 18px;
  background: #101923;
  border: 1px solid #243342;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #eef4f8;
}

.connection-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.connection-main h2,
.connection-main p {
  margin: 0;
}

.connection-main h2 {
  font-size: 19px;
}

.connection-main p {
  margin-top: 4px;
  color: #bfd0df;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.query-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.query-pill.ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.query-pill.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.connection-command,
.connect-command-box {
  display: grid;
  gap: 7px;
}

.connection-command span,
.connect-command-box span {
  color: #9fb2c5;
  font-size: 12px;
  font-weight: 800;
}

.connection-command code,
.connect-command-box code,
.connection-help code {
  display: block;
  padding: 10px 12px;
  border: 1px solid #2f4051;
  border-radius: 6px;
  background: #07101a;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  overflow-x: auto;
  white-space: nowrap;
}

.connection-meta {
  display: grid;
  gap: 6px;
  color: #c7d4e1;
  font-size: 12px;
}

.connection-meta b {
  color: #ffffff;
}

.connect-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.connect-actions.wide {
  justify-content: flex-start;
}

.steam-connect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  background: #16a34a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.22);
}

.steam-connect-button.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.plain-link {
  color: #93c5fd;
  white-space: nowrap;
}

.connection-note {
  grid-column: 1 / -1;
  margin: -3px 0 0;
  color: #fcd34d;
  font-size: 13px;
  font-weight: 800;
}

.status-panel,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-panel {
  min-height: 178px;
  padding: 18px;
}

.section-title,
.panel h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.state-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.state-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
}

.state-mark.online {
  background: var(--green);
}

.state-mark.offline {
  background: var(--red);
}

.state-row strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
}

.state-row p,
.players-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.players-count {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 22px;
}

.players-count strong {
  font-size: 42px;
}

.players-count span:last-child {
  color: #818898;
  font-size: 28px;
}

.mini-icon {
  color: var(--blue);
  font-size: 24px;
}

.meter {
  margin-top: 18px;
  height: 10px;
  border-radius: 999px;
  background: #e5e9ee;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: var(--blue);
}

.control-panel {
  padding: 24px 20px;
}

.control-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.control-buttons > form:not([data-server-control]) {
  display: none;
}

.control-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.control-button.start {
  background: #16a34a;
}

.control-button.stop {
  background: #dc2626;
}

.control-button.restart {
  background: #0b63d8;
}

.control-button.update {
  background: #f97316;
}

.control-button.save {
  background: #111827;
}

.control-button.is-busy {
  opacity: 0.7;
}

.server-progress {
  display: grid;
  gap: 12px;
  text-align: left;
}

.server-progress-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.server-progress-status.ok {
  background: #e7f7ec;
  color: #166534;
}

.server-progress-status.error {
  background: #fee2e2;
  color: #991b1b;
}

.server-progress-steps {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.server-progress-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13px;
  color: #334155;
}

.server-progress-step::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #94a3b8;
}

.server-progress-step.done::before {
  background: var(--green);
}

.server-progress-step.error::before {
  background: var(--red);
}

.server-progress-command {
  display: block;
  padding: 10px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #1e3a8a;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.server-progress-log {
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.server-progress-log summary {
  cursor: pointer;
  color: #93c5fd;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  margin-bottom: 6px;
}

.control-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 0;
}

.control-meta div {
  min-width: 0;
}

.control-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.control-meta dd {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 126px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--dark-card);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.metric-head strong {
  font-size: 14px;
  font-weight: 700;
}

.metric-value {
  margin-top: 18px;
  font-size: 30px;
  font-weight: 900;
}

.metric-detail {
  margin-top: 4px;
  color: #dbe4ed;
  font-size: 14px;
}

.metric-card.green .metric-value {
  color: #68e083;
}

.metric-card.blue .metric-value {
  color: #3b82f6;
}

.metric-card.amber .metric-value {
  color: #fbbf24;
}

.metric-chart {
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: min(42%, 230px) !important;
  height: 58px !important;
  opacity: 0.95;
  pointer-events: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.7fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.side-column {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 18px;
}

.content > .panel,
.content > form.panel,
.content > section.panel {
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head span,
.table-note,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.x3-list {
  display: grid;
  gap: 8px;
}

.x3-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f5;
  font-size: 15px;
}

.x3-list b,
.x3-list em,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 24px;
  border-radius: 6px;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.x3-list b,
.ok-pill {
  color: var(--green);
  background: var(--green-soft);
}

.x3-list em {
  color: #64748b;
  background: #f1f5f9;
}

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.45;
}

.notice.info {
  border: 1px solid #bfdbfe;
  background: var(--blue-soft);
  color: #1d4ed8;
}

.notice.warning {
  border: 1px solid #f7d38c;
  background: var(--amber-soft);
  color: #8a5a00;
}

.dense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dense-table th,
.dense-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}

.dense-table th {
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
}

.dense-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.add-button {
  margin-top: 18px;
  min-width: 112px;
  border: 0;
  background: var(--blue);
  color: #ffffff;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
}

.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.16s ease;
}

.switch.on {
  background: var(--green);
}

.switch.on::after {
  transform: translateX(20px);
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.weekday-row span,
.time-box {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 800;
  color: #475569;
}

.weekday-row span.active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.time-box {
  justify-content: start;
  padding: 0 12px;
  margin-top: 12px;
  font-size: 16px;
}

.quick-panel {
  margin-bottom: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.quick-grid button {
  width: 100%;
  min-height: 54px;
  text-align: left;
  background: #fbfdff;
}

.quick-grid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 600;
}

.ok {
  color: var(--green);
}

.warn {
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-stack,
.inline-form {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-transform: none;
  font-size: 14px;
}

.wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 11px;
  font-size: 14px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(9, 105, 218, 0.2);
  border-color: var(--blue);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

button.danger {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

button.link-danger {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 0;
}

.detail-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-list.big {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 13px 16px;
}

.connection-page .page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.connection-page .page-title p,
.connection-page .page-title h1 {
  margin: 0;
}

.connection-page .page-title p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.connection-page .page-title h1 {
  margin-top: 4px;
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.15;
}

.connection-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.connection-guide,
.connection-status-card,
.connection-help {
  padding: 18px;
}

.connect-command-box {
  margin-top: 18px;
}

.connection-help {
  margin-top: 14px;
}

.connection-help ol {
  margin: 0;
  padding-left: 22px;
  color: #1f2937;
  line-height: 1.8;
  font-weight: 650;
}

.connection-help code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  font-size: 13px;
  vertical-align: middle;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-header h1 {
  margin: 0;
  font-size: 26px;
}

.settings-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.settings-detail {
  margin-bottom: 16px;
}

.seed-table {
  margin-bottom: 16px;
}

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

.server-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #111827;
}

.two-columns {
  grid-template-columns: 1.2fr 0.9fr;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--sidebar);
  padding: 20px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.login-brand {
  color: var(--text);
  margin-bottom: 24px;
}

.login-panel h1 {
  margin: 0 0 8px;
}

.login-panel p {
  color: var(--muted);
  margin: 0 0 18px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.loot-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
}

.loot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.loot-container-card {
  display: grid;
  grid-template-rows: 130px auto;
  gap: 12px;
  min-height: 250px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.loot-container-card:hover {
  border-color: #b7c5d4;
  transform: translateY(-1px);
}

.loot-container-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  background: #111827;
}

.loot-container-card strong,
.loot-container-card span,
.loot-container-card small,
.loot-container-card em {
  display: block;
}

.loot-container-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.loot-container-card span,
.loot-container-card small {
  margin-top: 5px;
  color: var(--muted);
}

.loot-container-card em {
  margin-top: 10px;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.loot-detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.loot-detail-title img {
  width: 110px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: #111827;
}

.loot-detail-title h1 {
  margin: 0;
  font-size: 24px;
}

.loot-detail-title p {
  margin: 5px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.loot-items-list {
  display: grid;
  gap: 10px;
}

.loot-item-row {
  display: grid;
  grid-template-columns: 58px minmax(130px, 1fr) minmax(130px, 1fr) 130px 95px 95px 90px 72px 82px 78px 72px auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
}

.loot-item-row img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: #26313c;
}

.loot-item-row button {
  min-height: 40px;
}

.loot-lock,
.loot-stack {
  align-self: center;
  justify-self: start;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.loot-lock {
  color: #991b1b;
  background: #fee2e2;
}

.loot-stack {
  color: #15803d;
  background: #dcfce7;
}

.loot-page {
  background: #111614;
  background-image:
    linear-gradient(180deg, rgba(7, 10, 9, 0.96), rgba(19, 22, 20, 0.92)),
    radial-gradient(circle at 18% 4%, rgba(181, 61, 42, 0.22), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(111, 129, 75, 0.16), transparent 34%);
  color: #f2eee8;
}

.loot-page .topbar {
  margin-bottom: 18px;
}

.loot-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(33, 36, 33, 0.96), rgba(18, 20, 18, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.loot-list-hero h1,
.loot-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.1;
}

.loot-list-hero p,
.loot-hero p {
  margin: 8px 0 0;
  color: #b9b2a8;
}

.loot-list-hero .header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dark-filter {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(10, 12, 11, 0.86);
}

.dark-filter label,
.item-picker-panel label,
.drop-editor label {
  color: #cfc8bd;
}

.dark-filter input,
.dark-filter select,
.item-picker-panel input,
.item-picker-panel select,
.drop-editor input,
.drop-editor select {
  border-color: rgba(255, 255, 255, 0.1);
  background: #181d1b;
  color: #f7f2eb;
}

.loot-container-card {
  grid-template-rows: 136px auto;
  min-height: 264px;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #20251f, #151815);
  color: #f4efe8;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.loot-container-card:hover {
  border-color: rgba(255, 91, 64, 0.64);
  background: linear-gradient(180deg, #2a2f28, #171a16);
}

.loot-container-card img {
  height: 136px;
  background: #070908;
}

.loot-container-card strong {
  color: #ff6046;
}

.loot-container-card span,
.loot-container-card small {
  color: #bfb7ac;
}

.loot-container-card em {
  color: #8ee29b;
  font-size: 12px;
  font-weight: 900;
}

.loot-detail-title {
  gap: 16px;
}

.loot-detail-title img {
  width: 126px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090b0a;
}

.loot-detail-title h1 {
  color: #ffffff;
  font-size: 28px;
}

.loot-detail-title p {
  color: #b9b2a8;
}

.loot-detail-title p span {
  overflow-wrap: anywhere;
}

.loot-back-link,
.loot-add-shortcut {
  color: #ff6b4a;
  font-size: 13px;
  font-weight: 900;
}

.loot-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 14px;
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.loot-hero-stats strong {
  color: #ff5b40;
  font-size: 24px;
}

.loot-hero-stats span {
  color: #d1cac0;
  font-size: 12px;
  font-weight: 800;
}

.loot-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.loot-board,
.loot-rule-card,
.item-picker-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(18, 21, 19, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.loot-board,
.item-picker-panel {
  padding: 18px;
}

.loot-rule-card {
  position: sticky;
  top: 18px;
  padding: 18px;
}

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

.loot-board-head h2,
.loot-rule-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
}

.loot-board-head p,
.loot-rule-card p {
  margin: 6px 0 0;
  color: #bdb5aa;
  line-height: 1.5;
}

.drop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.drop-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(46, 48, 44, 0.92), rgba(25, 27, 24, 0.94));
  overflow: hidden;
}

.drop-card[open] {
  border-color: rgba(255, 91, 64, 0.52);
}

.drop-card summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.drop-card summary::-webkit-details-marker {
  display: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 7px;
  background: #0d100f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.drop-icon img,
.picker-item-card img {
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.drop-copy {
  min-width: 0;
}

.drop-copy strong {
  display: block;
  color: #ff6247;
  font-size: 16px;
  line-height: 1.2;
}

.drop-copy small {
  display: block;
  margin-top: 4px;
  color: #afa79c;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.drop-amount {
  justify-self: end;
  align-self: start;
  min-width: 34px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #36362f;
  color: #fff2d8;
  font-size: 13px;
  font-weight: 900;
}

.drop-card .loot-lock,
.drop-card .loot-stack {
  grid-column: 2 / 4;
  width: fit-content;
}

.loot-lock,
.loot-stack {
  align-self: center;
  justify-self: start;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.loot-lock {
  color: #ffd4ca;
  background: rgba(220, 38, 38, 0.22);
}

.loot-stack {
  color: #9ef0a6;
  background: rgba(22, 163, 74, 0.22);
}

.drop-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.drop-editor-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.drop-editor-actions button {
  flex: 1;
}

.loot-empty-dark {
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #d9d0c3;
}

.loot-empty-dark strong,
.loot-empty-dark span {
  display: block;
}

.item-picker-panel {
  margin-top: 16px;
}

.picker-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px;
  gap: 10px;
  min-width: min(620px, 100%);
}

.item-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 10px;
}

.picker-item-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(39, 42, 38, 0.94), rgba(22, 24, 22, 0.96));
}

.picker-item-card div {
  min-width: 0;
}

.picker-item-card strong {
  display: block;
  color: #ff6046;
  font-size: 15px;
  line-height: 1.18;
}

.picker-item-card span,
.picker-item-card small {
  display: block;
  margin-top: 3px;
  color: #afa79c;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.picker-item-card button {
  grid-row: 1;
  grid-column: 3;
  min-width: 64px;
}

.picker-item-card em {
  grid-column: 2 / 4;
  font-style: normal;
}

.picker-item-card.is-hidden {
  display: none;
}

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.mod-card p {
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.5;
}

.mod-actions {
  margin-top: 16px;
}

.image-upload-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.image-upload-grid img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #111827;
}

.empty-state {
  grid-column: 1 / -1;
}

.shop-page {
  max-width: 1600px;
}

.shop-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.shop-hero h1 {
  margin: 0;
  font-size: 28px;
}

.shop-hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.placement-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 14px;
}

.placement-status strong {
  color: var(--text);
}

.placement-status span {
  color: var(--muted);
}

.placement-status code {
  background: #eef2ff;
  border-radius: 6px;
  color: #1d4ed8;
  padding: 2px 6px;
}

.shop-summary {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 4px 12px;
  min-width: 160px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #111827;
  color: #dbe7f1;
}

.shop-summary strong {
  color: #ffffff;
  font-size: 24px;
}

.shop-summary span {
  color: #9fb2c5;
  font-size: 12px;
  font-weight: 800;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.3fr);
  gap: 14px;
  margin-bottom: 14px;
}

.outpost-map {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #2f3b2f;
  background:
    linear-gradient(90deg, rgba(20, 27, 22, 0.72) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(20, 27, 22, 0.72) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 47% 45%, rgba(105, 119, 75, 0.85), rgba(71, 82, 56, 0.42) 22%, transparent 23%),
    radial-gradient(circle at 65% 64%, rgba(59, 88, 106, 0.7), transparent 25%),
    linear-gradient(135deg, #9c936d, #5e7759 42%, #766b50);
}

.outpost-map::before,
.outpost-map::after {
  content: "";
  position: absolute;
  inset: auto -8% 34% -8%;
  height: 26px;
  background: rgba(42, 43, 37, 0.68);
  transform: rotate(-18deg);
}

.outpost-map::after {
  inset: 40% -8% auto -8%;
  transform: rotate(23deg);
}

.outpost-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  color: rgba(22, 22, 18, 0.72);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.vendor-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #8ee24d;
  border: 4px solid #253515;
  color: #10200a;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.35);
}

.vendor-marker::before {
  content: "▣";
  font-size: 24px;
  line-height: 1;
}

.vendor-marker span {
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #222;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.vendor-marker.active {
  outline: 4px solid rgba(255, 255, 255, 0.75);
}

.vendor-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.vendor-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
}

.vendor-list a.active {
  background: var(--green-soft);
  color: var(--green);
}

.vendor-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.vendor-settings button {
  align-self: end;
}

.vendor-items {
  display: grid;
  gap: 10px;
}

.shop-item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  overflow: hidden;
}

.shop-item-card summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.shop-item-card summary::-webkit-details-marker {
  display: none;
}

.shop-item-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 6px;
  background: #18222d;
}

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

.shop-item-card small {
  margin-top: 3px;
  color: var(--muted);
}

.shop-item-card b {
  color: var(--text);
  white-space: nowrap;
}

.shop-item-card em {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.shop-item-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.shop-item-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.shop-picker {
  background: #151a16;
}

.shop-catalog-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon info info"
    "icon price button";
  min-height: 124px;
  align-items: center;
}

.shop-catalog-card img {
  grid-area: icon;
}

.shop-catalog-card div {
  grid-area: info;
}

.shop-catalog-card strong {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.shop-catalog-card span,
.shop-catalog-card small {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

.shop-catalog-card label {
  grid-area: price;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfc8bd;
}

.shop-catalog-card input {
  min-height: 36px;
  width: 86px;
}

.shop-catalog-card button {
  grid-area: button;
  grid-column: auto;
  grid-row: auto;
  justify-self: end;
  min-width: 74px;
}

.shop-picker .item-picker-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.stack-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.item-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 170px auto auto;
  gap: 12px;
  align-items: end;
}

.stack-item-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stack-item-card.locked {
  background: #f7f9fc;
}

.stack-item-media {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #101822;
}

.stack-item-media img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.stack-item-info {
  min-width: 0;
}

.stack-item-info strong,
.stack-item-info code,
.stack-item-info span {
  display: block;
}

.stack-item-info strong {
  font-size: 16px;
  color: var(--ink);
}

.stack-item-info code {
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack-item-info span {
  margin-top: 6px;
  color: var(--accent);
  font-weight: 700;
}

.stack-item-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.stack-item-stats div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.stack-item-stats dt {
  color: var(--muted);
  font-size: 12px;
}

.stack-item-stats dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.stack-item-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.stack-lock {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  color: #8a3412;
  background: #fff7ed;
}

.heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.heading-meta span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.status-ok {
  color: #16a34a !important;
}

.status-warn {
  color: #ca8a04 !important;
}

.status-danger {
  color: #dc2626 !important;
}

.player-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto auto;
  gap: 12px;
  align-items: end;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.notice.warn {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid #facc15;
  border-radius: 8px;
  color: #854d0e;
  background: #fefce8;
}

.player-list-panel {
  display: grid;
  gap: 14px;
}

.player-table {
  display: grid;
  gap: 12px;
}

.player-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(360px, 1.7fr) minmax(320px, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.player-row.is-online {
  border-color: #86efac;
  box-shadow: inset 4px 0 0 #16a34a;
}

.player-main {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.player-main h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.player-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.player-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.player-meta-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.player-meta-grid span,
.player-meta-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.player-meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.3;
}

.player-actions {
  display: grid;
  gap: 10px;
}

.player-actions form {
  margin: 0;
}

.ban-form {
  display: grid;
  grid-template-columns: 110px 110px minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.ban-form label {
  min-width: 0;
}

.ban-form input,
.ban-form select {
  min-width: 0;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state small {
  overflow-wrap: anywhere;
}

@media (max-width: 1250px) {
  .dashboard-hero,
  .dashboard-grid,
  .connection-strip,
  .connection-layout,
  .shop-layout,
  .player-row {
    grid-template-columns: 1fr;
  }

  .loot-workbench {
    grid-template-columns: 1fr;
  }

  .loot-rule-card {
    position: static;
  }

  .control-meta,
  .control-buttons,
  .quick-grid,
  .item-filter-bar,
  .loot-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .content {
    padding: 0 12px 18px;
  }

  .topbar {
    margin: 0 -12px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .topbar-actions {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    white-space: normal;
  }

  .control-meta,
  .control-buttons,
  .quick-grid,
  .form-grid,
  .inline-form,
  .loot-filter,
  .loot-item-row,
  .image-upload-grid,
  .picker-tools,
  .drop-editor {
    grid-template-columns: 1fr;
  }

  .connection-page .page-title {
    display: grid;
  }

  .loot-hero,
  .loot-board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .loot-detail-title {
    align-items: flex-start;
  }

  .loot-detail-title img {
    width: 96px;
    height: 70px;
  }

  .drop-gallery,
  .item-picker-grid,
  .loot-grid {
    grid-template-columns: 1fr;
  }

  .picker-item-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .picker-item-card button,
  .picker-item-card em {
    grid-column: 1 / -1;
  }

  .shop-catalog-card {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-areas:
      "icon info"
      "price price"
      "button button";
  }

  .shop-catalog-card button {
    justify-self: stretch;
  }

  .item-filter-bar,
  .player-filter-bar,
  .ban-form,
  .stack-item-form {
    grid-template-columns: 1fr;
  }

  .heading-meta {
    justify-content: flex-start;
  }

  .player-meta-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    min-height: auto;
  }

  .state-row {
    align-items: flex-start;
  }

  .panel,
  .status-panel,
  .metric-card {
    overflow: hidden;
  }

  .dense-table {
    table-layout: fixed;
  }

  .dense-table th,
  .dense-table td {
    padding: 8px 6px;
    overflow-wrap: anywhere;
  }

.metric-chart {
    width: 120px !important;
  }
}

.inline-action-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.local-game-panel {
  display: grid;
  gap: 18px;
}

.local-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.status-tile code {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.status-tile.ok {
  border-color: rgba(22, 163, 74, 0.35);
}

.status-tile.warn {
  border-color: rgba(245, 158, 11, 0.45);
}

.status-tile.danger {
  border-color: rgba(220, 38, 38, 0.45);
}

.keybind-list {
  display: grid;
  gap: 8px;
}

.keybind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 100px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.keybind-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.keybind-row kbd {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
  background: #f3f4f6;
  font-weight: 800;
}

.keybind-row.ok span {
  color: #16a34a;
  font-weight: 800;
}

.keybind-row.missing span {
  color: #dc2626;
  font-weight: 800;
}

@media (max-width: 900px) {
  .local-status-grid,
  .keybind-row {
    grid-template-columns: 1fr;
  }
}
