.chain-switch { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #344239; border-radius: 6px; background: #0b100d; flex: 0 0 auto; }
.chain-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 16px; border-radius: 3px; color: #bdcec4; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.chain-switch a:hover { background: #1b2b21; color: #fff; }
.chain-switch a[aria-current="page"] { background: #45c983; color: #07140c; }
.chain-switch a:focus-visible { outline: 2px solid #eef6f0; outline-offset: 2px; }
@media (max-width: 820px) { .chain-switch { width: fit-content; max-width: 100%; } .chain-switch a { padding: 0 13px; } }

:root {
  color-scheme: dark;
  --bg: #050705;
  --panel: #0b100d;
  --panel-2: #101812;
  --line: #27332a;
  --text: #eef6f0;
  --muted: #8f9f94;
  --primary: #45c983;
  --primary-hover: #61de98;
  --green: #45c983;
  --link: #9cf2b9;
  --link-hover: #f4fff7;
  --active-row: #173c27;
  --active-row-border: #71ef9f;
  --slot-row: #253229;
  --status-red: #f06a75;
  --status-red-row: #211012;
  --status-amber: #efb95b;
  --status-amber-row: #20190d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 20px 20px 0;
}

@supports (height: 100dvh) {
  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.app-header {
  position: relative;
  gap: 20px;
  flex-wrap: wrap;
  padding-right: 150px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 46px;
  margin-bottom: 0;
  padding-bottom: 10px;
}

.app-header h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  text-align: left;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  overflow: hidden;
}

.brand-mark .svg-icon {
  width: 24px;
  height: 24px;
}

.link-row {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0;
  min-width: 0;
  padding-top: 0;
  font-size: 0;
  white-space: nowrap;
}

.link-row a {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  place-items: center;
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.link-row a:hover {
  color: var(--primary);
  background: #101812;
}

.external-link-twitter::before {
  content: "X";
  font-size: 13px;
}

.external-link-telegram::before {
  content: "↗";
  font-size: 18px;
}

.external-link-akbot::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  background:
    linear-gradient(135deg, transparent 55%, currentColor 56% 62%, transparent 63%),
    var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.control-band {
  position: relative;
  z-index: 5;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  text-align: left;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 47px;
  margin-bottom: 0;
  padding-top: 2px;
}

.tool-button,
.search-button {
  min-height: 34px;
  border: 1px solid rgba(238, 246, 240, 0.72);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
}

.tool-button:hover,
.search-button:hover {
  border-color: var(--primary);
  background: var(--panel-2);
  color: #ffffff;
}

.tool-button.is-active,
.search-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.search-button {
  min-width: 56px;
}

.tool-button[data-filter="all"] {
  border-radius: 6px 0 0 6px;
}

.tool-button[data-filter="success"] {
  border-left: 0;
  border-radius: 0;
}

.tool-button[data-filter="remark"] {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.language-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  margin-left: 10px;
  padding: 0;
  border-radius: 6px;
}

.language-toggle::before {
  content: attr(data-glyph);
  font-size: 13px;
  line-height: 1;
}

#columnsToggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  border-radius: 6px;
}

#columnsToggle::before {
  content: "▥";
  display: inline-block;
  font-size: 12px;
  line-height: 1;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(100%, 700px);
  max-width: none;
  margin: 0;
}

.search-row input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #2d3a31;
  border-radius: 5px;
  background: #111611;
  color: var(--text);
  padding: 0 13px;
  outline: none;
  font-size: 14px;
}

.search-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(69, 201, 131, 0.18);
}

.status-row {
  display: none;
  min-height: 0;
  margin-top: 8px;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}

.status-row.is-visible {
  display: block;
  min-height: 20px;
}

.status-row.is-fallback {
  border-left: 3px solid #e3b341;
  background: rgba(227, 179, 65, 0.1);
  color: #f1d58a;
  padding: 6px 10px;
}

.query-source-badge {
  position: absolute;
  top: 4px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  max-width: min(48vw, 560px);
  overflow: hidden;
  white-space: nowrap;
}

.query-source-badge[hidden] {
  display: none;
}

.query-source-badge-item {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(130, 201, 157, 0.42);
  border-radius: 4px;
  background: rgba(22, 49, 32, 0.82);
  padding: 0 8px;
  color: #dff6e7;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.query-source-badge-item.is-database {
  border-color: rgba(109, 212, 154, 0.54);
  color: #bff2d2;
}

.query-source-badge-item.is-local-rpc {
  border-color: rgba(119, 182, 241, 0.55);
  background: rgba(36, 64, 90, 0.72);
  color: #c4e2ff;
}

.query-source-badge-item.is-helius {
  border-color: rgba(224, 174, 93, 0.62);
  background: rgba(75, 57, 28, 0.72);
  color: #ffe2a8;
}

.query-source-badge-item.is-public-rpc {
  border-color: rgba(192, 146, 235, 0.58);
  background: rgba(58, 39, 78, 0.72);
  color: #ead5ff;
}

.column-panel {
  position: absolute;
  left: 350px;
  top: 44px;
  transform: none;
  width: min(320px, calc(100vw - 48px));
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b100d;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
  font-size: 13px;
}

.column-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.table-shell {
  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 6px;
}

.table-scroll-spacer {
  display: block;
  width: 1px;
  height: 0;
  pointer-events: none;
}

.tx-table {
  width: 100%;
  min-width: 1490px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.tx-table thead {
  display: table-header-group;
}

.tx-table tbody {
  display: table-row-group;
}

.tx-table th,
.tx-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  white-space: nowrap;
  line-height: 1.25;
}

.tx-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #131913;
  color: #e8f2eb;
  font-weight: 600;
}

.tx-table td {
  background: #0d110e;
  color: #e1e9e3;
  padding: 11px 7px;
}

.tx-table td a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.cell-actions > a:not(.cell-icon-button) {
  flex: 1 1 auto;
  min-width: 0;
}

.cell-icon-button {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: #dbe6de;
  cursor: pointer;
  line-height: 1;
}

.svg-icon {
  display: block;
  width: 15px;
  height: 15px;
  pointer-events: none;
  stroke-width: 2;
}

.icon-solscan .svg-icon {
  width: 18px;
  height: 18px;
}

button.cell-icon-button {
  appearance: none;
  font: inherit;
}

.cell-icon-button:hover {
  color: var(--primary);
  background: rgba(67, 199, 131, 0.08);
}

.cell-icon-button.is-copied {
  color: #6ff0a6;
  background: rgba(67, 199, 131, 0.18);
}

.cell-icon-button.is-copy-failed {
  color: #ff7c88;
  background: rgba(255, 89, 103, 0.14);
}

.icon-solscan {
  width: 18px;
  height: 18px;
}

.address-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.address-cell-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.address-cell-main > .cell-actions {
  flex: 0 1 auto;
  min-width: 0;
}

.node1-route-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.node1-route-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: calc(50% - 2px);
  border: 1px solid rgba(76, 201, 132, 0.28);
  border-radius: 4px;
  background: rgba(76, 201, 132, 0.07);
  padding: 1px 5px;
  color: #dff4e6;
  font-size: 11px;
  line-height: 16px;
}

.node1-route-chip.is-signal {
  border-color: rgba(76, 201, 132, 0.42);
  background: rgba(76, 201, 132, 0.15);
}

.address-cell.has-route {
  grid-template-columns: minmax(0, 1fr);
}

.address-cell.has-route .address-cell-main {
  flex-wrap: wrap;
  gap: 3px 6px;
}

.address-cell.has-route .node1-route-chip {
  max-width: 100%;
}

.node1-follow-badges {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
}

.node1-route-chip.is-follow {
  flex: 0 1 auto;
  max-width: 100%;
}

.node1-route-chip.is-tool-machine {
  border-color: rgba(150, 232, 116, 0.5);
  background: rgba(150, 232, 116, 0.13);
  color: #f3ffe9;
}

.node1-route-chip.is-tool-machine .node1-route-label {
  color: #a8e888;
}

.node1-route-chip:only-child {
  max-width: 100%;
}

.node1-route-label {
  flex: 0 0 auto;
  color: #82c99d;
}

.node1-route-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f0f8f2;
}

.remark-pill {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: auto;
  border: 1px solid rgba(76, 201, 132, 0.24);
  border-radius: 4px;
  background: rgba(76, 201, 132, 0.1);
  color: #b6f7ce;
  padding: 2px 5px;
  font-size: 12px;
  line-height: 1.25;
}

.clipboard-fallback {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tx-table tr:hover td {
  background: #141b16;
}

.tx-table tr.is-last-in-slot td {
  box-shadow: inset 0 -1px 0 #59665d;
}

.tx-table tr.slot-leader-row td {
  padding: 0;
  background: #101812;
  color: #e8f2eb;
  box-shadow: inset 3px 0 0 var(--primary), inset 0 -1px 0 rgba(111, 174, 130, 0.34);
  white-space: normal;
}

.tx-table tr.slot-leader-row:hover td {
  background: #101812;
}

.slot-leader-content {
  display: flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 5px 10px;
  overflow: hidden;
  white-space: nowrap;
}

.slot-leader-slot,
.slot-leader-name,
.slot-leader-field {
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-leader-slot {
  border: 1px solid rgba(103, 234, 153, 0.42);
  border-radius: 3px;
  color: #b9f8cd;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.slot-leader-name {
  color: #ffffff;
  font-weight: 700;
}

.slot-leader-field {
  color: #b6c6ba;
  font-size: 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.slot-leader-field.is-client {
  flex: 0 1 138px;
  color: #80e6a2;
}

.slot-leader-field.is-ip {
  flex: 1 1 210px;
  color: #d6e0d8;
}

.slot-leader-row.is-unavailable .slot-leader-name,
.slot-leader-field.is-unavailable {
  color: #9da89f;
}

.slot-leader-field.is-identity,
.slot-leader-field.is-tpu {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #a6ddb7;
}

.slot-leader-field.is-identity {
  flex: 1.55 1 300px;
  max-width: 470px;
}

.slot-leader-field.is-tpu {
  flex: 1.2 1 245px;
  max-width: 460px;
}

.slot-leader-prefix {
  flex: 0 0 auto;
  color: #78d99a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.slot-leader-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-leader-detail {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #94aa9a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
}

.slot-leader-detail::before {
  content: "\00b7";
  margin-right: 5px;
  color: #52725b;
}

.slot-leader-field.is-ip .slot-leader-value,
.slot-leader-field.is-tpu .slot-leader-value,
.slot-leader-field.is-identity .slot-leader-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tx-table tr.is-active td {
  background: var(--active-row);
  color: #ffffff;
  box-shadow:
    inset 0 2px 0 var(--active-row-border),
    inset 0 -2px 0 var(--active-row-border);
}

.tx-table tr.is-active td:first-child {
  box-shadow:
    inset 4px 0 0 var(--active-row-border),
    inset 0 2px 0 var(--active-row-border),
    inset 0 -2px 0 var(--active-row-border);
}

.tx-table tr.is-purchase-success td {
  color: var(--green);
  background: #0d1510;
}

.tx-table tr.is-purchase-success .cell-icon-button {
  color: var(--green);
}

.tx-table tr.is-purchase-failed td {
  background: var(--status-amber-row);
  color: #f2e2bd;
}

.tx-table tr.is-chain-failed td {
  background: var(--status-red-row);
  color: #f2dadd;
}

.tx-table tr.is-unresolved td {
  background: rgba(145, 158, 171, 0.08);
  color: #c9d1d9;
}

.tx-table tr.is-unresolved td:first-child {
  box-shadow: inset 3px 0 0 #8b98a5;
}

.tx-table tr.is-purchase-failed td:first-child {
  box-shadow: inset 3px 0 0 var(--status-amber);
}

.tx-table tr.is-chain-failed td:first-child {
  box-shadow: inset 3px 0 0 var(--status-red);
}

.tx-table tr.is-active.is-purchase-success td {
  background: var(--active-row);
}

.tx-table tr.is-active.is-purchase-failed td {
  background: #3b2b11;
  box-shadow: inset 0 2px 0 var(--status-amber), inset 0 -2px 0 var(--status-amber);
}

.tx-table tr.is-active.is-purchase-failed td:first-child {
  box-shadow: inset 4px 0 0 var(--status-amber), inset 0 2px 0 var(--status-amber), inset 0 -2px 0 var(--status-amber);
}

.tx-table tr.is-active.is-chain-failed td {
  background: #3a151a;
  box-shadow: inset 0 2px 0 var(--status-red), inset 0 -2px 0 var(--status-red);
}

.tx-table tr.is-active.is-chain-failed td:first-child {
  box-shadow: inset 4px 0 0 var(--status-red), inset 0 2px 0 var(--status-red), inset 0 -2px 0 var(--status-red);
}

.tx-table tr.is-active.is-unresolved td {
  background: #202830;
  box-shadow: inset 0 2px 0 #8b98a5, inset 0 -2px 0 #8b98a5;
}

.tx-table tr.is-active.is-unresolved td:first-child {
  box-shadow: inset 4px 0 0 #8b98a5, inset 0 2px 0 #8b98a5, inset 0 -2px 0 #8b98a5;
}

.empty-state {
  position: sticky;
  left: 0;
  display: grid;
  min-height: 0;
  width: 100%;
  place-items: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  line-height: 1.4;
}

.empty-state[hidden] {
  display: none;
}

.empty-state::before {
  content: "";
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.status-cell {
  display: inline-flex;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
  white-space: nowrap;
}

.status-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #ffffff;
  line-height: 1;
  grid-row: 1 / span 2;
}

.status-icon svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.status-icon.is-purchase-success,
.status-icon.is-purchase-failed {
  background: var(--green);
}

.status-icon.is-chain-failed {
  background: var(--status-red);
}

.status-icon.is-unresolved {
  background: #6f7c88;
}

.status-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 16px;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
}

.status-badge.is-chain-failed {
  background: rgba(240, 106, 117, 0.12);
  color: #ff98a1;
}

.status-badge.is-unresolved {
  background: rgba(145, 158, 171, 0.12);
  color: #b8c2cc;
}

.status-badge.is-purchase-failed {
  background: rgba(239, 185, 91, 0.1);
  color: var(--status-amber);
}

.status-badge.is-purchase-success {
  background: rgba(69, 201, 131, 0.1);
  color: var(--green);
}

.cell-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.header-inline,
.cell-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  column-gap: 7px;
  width: 100%;
}

.header-inline span,
.inline-value {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.value-with-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 4px;
  white-space: nowrap;
}

.inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  margin-left: 4px;
  padding: 0 3px;
  border: 1px solid rgba(72, 211, 128, 0.62);
  border-radius: 3px;
  color: #a8f2bf;
  background: #102a18;
  font-size: 9px;
  font-weight: 700;
  line-height: 13px;
  vertical-align: 1px;
}

.inline-badge.is-harmonic-bundle {
  border-color: rgba(73, 224, 168, 0.78);
  color: #d4ffe3;
  background: #123925;
}

.tx-table td[data-column='slot'],
.tx-table td[data-column='index'],
.tx-table td[data-column='amount'],
.tx-table td[data-column='price'],
.tx-table td[data-column='cuGroup'],
.tx-table td[data-column='feeGroup'] {
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
}

.stack-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.stack-label {
  flex: 0 0 auto;
  color: var(--muted);
}

.stack-value {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tone-buy {
  color: var(--primary) !important;
  font-weight: 700;
}

.tone-sell {
  color: var(--text) !important;
  font-weight: 700;
}

.tone-link {
  color: var(--link);
}

.remark-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.remark-dialog[hidden] {
  display: none;
}

.remark-panel {
  width: min(640px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171d18;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.remark-panel h2 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.25;
}

.remark-field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.remark-field input,
.remark-field textarea {
  width: 100%;
  border: 1px solid #2d3a31;
  border-radius: 8px;
  background: #0d110e;
  color: var(--text);
  padding: 12px;
  outline: none;
}

.remark-field textarea {
  min-height: 104px;
  resize: vertical;
}

.remark-field input[readonly] {
  color: var(--text);
}

.remark-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(76, 201, 132, 0.2);
}

.remark-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.remark-button {
  min-width: 74px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.remark-save {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.remark-button:disabled {
  cursor: wait;
  opacity: 0.66;
}

@media (max-width: 820px) {
  .app-shell {
    padding: 10px 10px 0;
  }

  .app-header {
    display: grid;
    padding-right: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 0;
  }

  .app-header h1 {
    justify-self: start;
    font-size: 18px;
  }

  .link-row {
    position: static;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 0;
    font-size: 14px;
  }

  .button-row {
    gap: 8px;
  }

  .tool-button,
  .search-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }

  .search-row {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .search-row input {
    min-height: 34px;
    font-size: 14px;
  }

  .status-row {
    font-size: 14px;
  }

  .query-source-badge {
    position: static;
    justify-content: flex-start;
    max-width: 100%;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  .column-panel {
    left: 0;
    top: 44px;
    transform: none;
  }

  .table-shell {
    margin-top: 10px;
  }
}
