:root {
  --bg: #eef1f4;
  --card: #ffffff;
  --ink: #252b33;
  --muted: #7a8491;
  --line: #dfe5ec;
  --line-strong: #cfd7e0;
  --panel: #f8fafc;
  --red: #e6464f;
  --red-dark: #c83641;
  --red-soft: #fff1f2;
  --green: #35b779;
  --green-soft: #ecfbf3;
  --teal: #14b8b6;
  --amber: #c98225;
  --shadow: 0 18px 46px rgba(28, 38, 52, 0.14);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f5f7fa 0%, var(--bg) 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.svg-sprite {
  display: none;
}

.shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.app-card {
  position: relative;
  overflow: hidden;
  padding: 28px 26px 30px;
  border: 1px solid rgba(207, 215, 224, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 230px;
  height: 150px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.58)),
    url("assets/security-network.png") center / cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

.language-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344154;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(27, 36, 50, 0.08);
}

.language-toggle:hover {
  border-color: rgba(230, 70, 79, 0.35);
  color: var(--red-dark);
}

.app-header {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fac7cd;
  border-radius: var(--radius);
  background: #fff6f7;
  overflow: hidden;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  display: block;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.25;
  color: #242a31;
}

.app-header p,
.section-heading p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.app-intro {
  max-width: 560px;
  margin: 4px auto 0;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.feature-pills span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(20, 184, 182, 0.18);
  border-radius: 999px;
  padding: 3px 9px;
  color: #167a75;
  background: #f0fbf8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.notice-card {
  position: relative;
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #f5c3c9;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 241, 242, 0.95), rgba(255, 247, 247, 0.95)),
    #fff5f6;
}

.notice-card h2 {
  color: var(--red);
  font-size: 17px;
}

.notice-list,
.safe-note {
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.notice-list {
  display: grid;
  gap: 9px;
  color: #e0525b;
  font-size: 14px;
  line-height: 1.55;
}

.notice-list p,
.safe-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.notice-list span,
.safe-note span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 999px;
  background: currentColor;
}

.safe-note {
  color: var(--teal);
  font-size: 14px;
  line-height: 1.55;
}

.form-section,
.review-panel,
.action-panel,
.details-panel,
.quick-links {
  padding-top: 22px;
  border-top: 1px solid #edf0f4;
}

.form-section + .form-section,
.review-panel,
.action-panel,
.details-panel,
.quick-links {
  margin-top: 22px;
}

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

.quick-link {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #2f6f9f;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: #b9d6ea;
  box-shadow: 0 8px 18px rgba(47, 111, 159, 0.1);
}

.quick-link strong {
  color: #2678b8;
  font-size: 16px;
}

.quick-link span {
  color: var(--muted);
  font-size: 13px;
}

.section-heading,
.score-top,
.button-row,
.log-toolbar {
  display: flex;
  align-items: center;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 20px;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 16px;
}

.flow-strip span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #465465;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 700;
}

.flow-strip strong,
.step-panel-title span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: #344154;
  font-size: 12px;
  line-height: 1;
}

.step-panels {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.step-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.step-panel-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.step-panel-title h3 {
  margin: 0 0 3px;
  color: #242d38;
  font-size: 17px;
  line-height: 1.25;
}

.step-panel-title p,
.mode-plain {
  margin: 0;
  color: #6e7b8b;
  font-size: 13px;
  line-height: 1.55;
}

.step-panel > .field-group:last-child,
.step-panel .button-row:last-child {
  margin-bottom: 0;
}

.candidate-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.advanced-panel[open] {
  display: grid;
  gap: 10px;
}

.advanced-summary {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

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

.advanced-summary::after {
  content: "›";
  color: #7f8d9d;
  font-size: 18px;
  line-height: 1;
}

.advanced-panel[open] .advanced-summary::after {
  transform: rotate(90deg);
}

.advanced-summary strong {
  color: #2c3644;
  font-size: 14px;
}

.advanced-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.advanced-body {
  display: grid;
  gap: 10px;
}

.advanced-body > .button {
  justify-self: start;
}

.candidate-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.candidate-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.candidate-heading strong {
  color: #2c3644;
  font-size: 14px;
}

.candidate-heading span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.candidate-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.wallet-details {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.candidate-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #3e4958;
  background: #fbfcfe;
  cursor: pointer;
  text-align: left;
}

.candidate-item strong,
.candidate-item span,
.candidate-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.candidate-item strong {
  color: #253143;
  font-size: 13px;
}

.candidate-item span {
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

.candidate-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.candidate-match {
  border-color: rgba(53, 183, 121, 0.32);
  background: #f2fbf6;
}

.candidate-match span {
  color: #20865a;
}

.candidate-limited,
.candidate-no-control,
.candidate-error {
  cursor: not-allowed;
}

.candidate-limited {
  border-color: rgba(201, 130, 37, 0.28);
  background: #fffaf2;
}

.candidate-limited span {
  color: #a26718;
}

.candidate-no-control,
.candidate-error {
  opacity: 0.72;
}

.candidate-error span {
  color: var(--red);
}

.candidate-item.is-current {
  box-shadow: 0 0 0 3px rgba(20, 184, 182, 0.12);
}

.mode-plain {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #cfeee7;
  border-radius: var(--radius);
  color: #147d78;
  background: #f0fbf8;
}

.operation-scope {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.operation-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
}

.operation-title > div:first-child {
  display: grid;
  gap: 3px;
}

.operation-scope[open] .operation-title {
  margin-bottom: 10px;
}

.operation-title strong {
  color: #2c3644;
  font-size: 14px;
}

.operation-title span {
  color: #16947f;
  font-size: 13px;
  font-weight: 700;
}

.operation-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  padding-top: 2px;
  justify-content: flex-end;
}

.operation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #cfd7e0;
  border-radius: 6px;
  color: #586575;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.operation-chip:hover {
  border-color: #8cc8bd;
  color: #147d78;
}

.operation-chip:focus-visible {
  outline: 3px solid rgba(22, 148, 127, 0.18);
  outline-offset: 2px;
}

.operation-chip.is-selected {
  border-color: rgba(22, 148, 127, 0.42);
  color: #116c67;
  background: #e9faf6;
  box-shadow: inset 0 0 0 1px rgba(22, 148, 127, 0.08);
}

.signer-heading {
  margin-top: 18px;
}

.control-grid,
.config-grid {
  display: grid;
  gap: 12px;
}

.control-grid {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-top: 14px;
}

.control-card {
  align-content: start;
  min-height: 114px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.control-card .field-hint {
  margin: 0;
}

.config-grid {
  grid-template-columns: minmax(0, 1.1fr) 112px minmax(0, 1.1fr) 112px minmax(0, 0.9fr);
  margin-top: 14px;
}

.permission-subsection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
}

.chain-options {
  display: grid;
  grid-template-columns: 156px 176px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.chain-options .field-group,
.chain-options .field-hint {
  margin: 0;
}

.field-group {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  color: #3d4754;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

textarea {
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: #a0a8b3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 182, 0.14);
}

input[readonly] {
  color: #526071;
  background: #f8fafc;
}

.segmented,
.mode-tabs {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

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

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

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

.segment,
.mode-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: #536171;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.segment.is-active,
.mode-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 8px 16px rgba(230, 70, 79, 0.22);
}

.wallet-panel[hidden],
.private-key-panel[hidden] {
  display: none;
}

.wallet-panel {
  margin-top: 6px;
  margin-bottom: 10px;
}

.private-key-panel {
  display: grid;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.field-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wallet-status {
  display: block;
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid rgba(53, 183, 121, 0.22);
  border-radius: 6px;
  background: #f2fbf6;
}

.submit-status {
  display: block;
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(53, 183, 121, 0.22);
  border-radius: 6px;
  background: #f2fbf6;
}

.cosign-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.cosign-panel[open] {
  display: grid;
  gap: 10px;
}

.cosign-summary {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

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

.cosign-summary::after {
  content: "›";
  color: #7f8d9d;
  font-size: 18px;
  line-height: 1;
}

.cosign-panel[open] .cosign-summary::after {
  transform: rotate(90deg);
}

.cosign-body {
  display: grid;
  gap: 10px;
}

.cosign-summary strong {
  color: #2c3644;
  font-size: 14px;
}

.cosign-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.cosign-actions .button {
  flex: 1 1 0;
}

.cosign-actions .button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.field-hint.is-ok {
  color: #20865a;
}

.field-hint.is-warn {
  color: #a26718;
}

.field-hint.is-danger {
  color: var(--red);
}

.button-row {
  gap: 10px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 16px;
  color: #29313b;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #b7c1cc;
}

.button:active,
.icon-button:active {
  transform: translateY(0);
}

.button-primary {
  color: #fff;
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.button-compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.wallet-panel .button,
.action-panel .button,
.private-key-actions .button {
  flex: 1 1 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: #344154;
  background: #fff;
  transition:
    transform 150ms ease,
    border-color 150ms ease;
}

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

.signer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 126px 42px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdff;
}

.signer-row .field-group {
  margin: 0;
}

.remove-signer {
  color: #a3303a;
}

.review-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
  gap: 14px;
}

.score-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f8fbfc 100%);
}

.score-top {
  justify-content: space-between;
  gap: 12px;
}

.score-top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.score-top strong {
  font-size: 36px;
  line-height: 1;
}

.score-meter {
  height: 9px;
  overflow: hidden;
  margin: 14px 0 12px;
  border-radius: 999px;
  background: #e4eaf0;
}

.score-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition:
    width 180ms ease,
    background 180ms ease;
}

#scoreLabel {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.summary-grid > div,
.fee-box > div {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.fee-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-grid span,
.fee-box span {
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong,
.fee-box strong {
  font-size: 14px;
}

.fee-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.text-button {
  border: 0;
  padding: 0;
  color: #327db6;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--red);
}

.text-button:disabled {
  color: #a3adb8;
  cursor: not-allowed;
}

.service-payment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(53, 183, 121, 0.24);
  border-radius: var(--radius);
  background: #f2fbf6;
}

.service-payment[hidden] {
  display: none;
}

.service-payment > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-payment span {
  color: var(--muted);
  font-size: 12px;
}

.service-payment strong {
  color: #246b4c;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.service-payment .field-hint {
  grid-column: 1 / -1;
  margin: 0;
}

.risk-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.risk-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #414d5b;
  background: #fff;
  font-size: 13px;
  line-height: 1.55;
}

.risk-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.risk-ok {
  border-color: rgba(53, 183, 121, 0.26);
  background: var(--green-soft);
}

.risk-ok svg {
  color: #248b5c;
}

.risk-warn {
  border-color: rgba(201, 130, 37, 0.28);
  background: #fff9ed;
}

.risk-warn svg {
  color: var(--amber);
}

.risk-danger {
  border-color: rgba(230, 70, 79, 0.28);
  background: var(--red-soft);
}

.risk-danger svg {
  color: var(--red);
}

.details-panel {
  color: #394657;
}

.details-panel summary {
  cursor: pointer;
  color: #3579b8;
  font-size: 17px;
  font-weight: 800;
  list-style: none;
}

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

.details-panel summary::after {
  content: "›";
  margin-left: 8px;
  color: #66a6d9;
}

.details-panel[open] summary {
  margin-bottom: 12px;
}

.preview {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #151d28;
  border-radius: var(--radius);
  color: #dff8f1;
  background: #121a24;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-toolbar {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.log-list {
  max-height: 140px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: #536171;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.log-entry + .log-entry {
  margin-top: 4px;
}

.is-invalid {
  border-color: var(--red);
  background: #fff8f9;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(17, 25, 35, 0.14);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(17, 25, 35, 0.94);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 680px);
    padding: 14px 0 28px;
  }

  .app-card {
    padding: 22px 18px 24px;
  }

  h1 {
    font-size: 27px;
  }

  .control-grid,
  .config-grid,
  .chain-options,
  .flow-strip,
  .review-panel {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    align-items: center;
  }

  .signer-row {
    grid-template-columns: minmax(0, 1fr) 78px 42px;
  }

  .signer-row .field-group:first-child {
    grid-column: 1 / -1;
  }

  .signer-row .field-group:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .signer-row .field-group:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .remove-signer {
    grid-column: 3 / 4;
    grid-row: 2;
  }
}

@media (max-width: 460px) {
  .shell {
    width: calc(100% - 14px);
  }

  .app-card {
    padding: 20px 12px 22px;
  }

  .app-header {
    margin-bottom: 18px;
  }

  h1 {
    font-size: 24px;
  }

  .notice-card {
    padding: 14px;
  }

  .notice-list,
  .safe-note {
    padding: 10px;
  }

  .segment,
  .mode-tab {
    min-height: 34px;
    font-size: 12px;
  }

  .button-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .candidate-heading {
    flex-direction: column;
  }

  .candidate-heading .button {
    width: 100%;
  }

  .operation-title {
    flex-direction: column;
    align-items: stretch;
  }

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

  .action-panel .button,
  .private-key-actions .button {
    flex-basis: calc(50% - 5px);
  }

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

  .signer-row {
    grid-template-columns: minmax(0, 1fr) 72px 42px;
    padding: 10px;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }
}
