body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 2rem 1rem;
  font: 16px/1.5 system-ui, sans-serif;
}

label {
  display: block;
}

.login {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  max-width: none;
  padding: 2rem 1rem;
  background: #000;
  color: #e8e8e8;
}

.login-card {
  width: 100%;
  max-width: 22rem;
  text-align: center;
}

.login-logo {
  display: block;
  margin: 0 auto 1.5rem;
  width: 144px;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.login-error {
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #a03a3a;
  border-radius: 8px;
  background: #241010;
  color: #ff8a8a;
  font-size: 0.875rem;
  text-align: left;
}

.login-note {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #8a8a8a;
}

.field-box {
  margin: 0 0 0.75rem;
  text-align: left;
}

.field-box label {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.field-box input,
.field-box textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #6b6b6b;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font: inherit;
}

.field-box input:focus,
.field-box textarea:focus {
  outline: none;
  border-color: #cf0;
}

.field-box textarea {
  min-height: 8rem;
  resize: vertical;
}

.primary,
.error-home a {
  box-sizing: border-box;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: #cf0;
  color: #000;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.primary:hover,
.error-home a:hover {
  background: #d9ff33;
}

.primary:active,
.error-home a:active {
  background: #b8e600;
}

.primary:focus-visible,
.error-home a:focus-visible {
  outline: 2px solid #cf0;
  outline-offset: 2px;
}

.form-submit {
  margin: 1.25rem 0 0;
}

.form-submit .primary,
.error-home a {
  width: 100%;
  padding: 0.75rem;
}

.form-submit a.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  text-decoration: none;
}

.google-mark {
  display: block;
  width: 16px;
  height: 16px;
}

.login-or {
  margin: 1.25rem 0;
  font-size: 0.875rem;
  color: #8a8a8a;
}

.form-secondary .primary {
  border: 1px solid #6b6b6b;
  background: transparent;
  color: #e8e8e8;
}

.form-secondary .primary:hover {
  border-color: #cf0;
  background: #1a1a1a;
}

.form-secondary .primary:active {
  border-color: #b8e600;
  background: #111;
}

.primary:disabled {
  cursor: default;
}

.form-secondary .primary:disabled,
.form-secondary .primary:disabled:hover,
.form-secondary .primary:disabled:active {
  border-color: #3a3a3a;
  background: transparent;
  color: #6b6b6b;
}

.error-text,
.error-note {
  color: #e8e8e8;
  font-size: 1.25rem;
  font-weight: 400;
}

.error-text {
  margin: 0 0 0.25rem;
}

.error-note {
  margin: 0 0 1.5rem;
}

.error-home {
  margin: 0;
}

.error-home a {
  display: block;
  text-decoration: none;
}

.tab-panel {
  display: none;
}

body:has(#tab-assets:checked) #panel-assets,
body:has(#tab-activity:checked) #panel-activity,
body:has(#tab-wallets:checked) #panel-wallets,
body:has(#tab-approvals:checked) #panel-approvals,
body:has(#tab-manage:checked) #panel-manage,
body:has(#tab-settings:checked) #panel-settings {
  display: block;
}

.app {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0 auto;
  max-width: 64rem;
  padding: 0 1rem 3rem;
  background: #000;
  color: #e8e8e8;
}

.app a {
  color: inherit;
  text-decoration: none;
}

.app a:hover,
.app a:focus-visible {
  color: #cf0;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding: 1rem 0;
}

.app-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.app-search-field {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.app-search-field.closed {
  pointer-events: none;
}

.app-search-toggle,
.message-open {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: #8a8a8a;
  line-height: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.app-search-toggle svg,
.message-open svg {
  display: block;
  width: 22px;
  height: 22px;
}

.app-search-toggle:hover,
.app-search-toggle:focus-visible {
  color: #e8e8e8;
}

.app .message-open {
  color: #8a8a8a;
}

.app .message-open:hover,
.app .message-open:focus-visible {
  color: #e8e8e8;
}

.search-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #1a1a1a;
  color: #e8e8e8;
  font: inherit;
  font-size: 0.875rem;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.2s ease, border-color 0.2s ease;
}

.app-search-field.closed .search-input {
  clip-path: inset(0 0 0 100%);
}

.search-input::placeholder {
  color: #6b6b6b;
}

.search-input:focus {
  outline: none;
  border-color: #cf0;
}

.search-results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.5rem);
  right: 0;
  left: 0;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #111;
  max-height: 24rem;
  overflow-y: auto;
}

.search-results.hidden {
  display: none;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #262626;
  font-size: 0.875rem;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result.selected {
  background: #171717;
}

.search-result-info {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.search-result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-detail {
  flex: none;
  color: #8a8a8a;
  font-size: 0.75rem;
}

.search-result-value {
  flex: none;
  color: #8a8a8a;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.search-empty {
  margin: 0;
  padding: 0.75rem;
  color: #8a8a8a;
  font-size: 0.875rem;
}

.app #tab-assets,
.app #tab-activity,
.app #tab-wallets,
.app #tab-approvals,
.app #tab-manage,
.app #tab-settings {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tab-label {
  display: inline-block;
  margin: 0 1.25rem 1.25rem 0;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  color: #8a8a8a;
  font-size: 0.875rem;
  cursor: pointer;
}

#tab-assets:checked + .tab-label,
#tab-activity:checked + .tab-label,
#tab-wallets:checked + .tab-label,
#tab-approvals:checked + .tab-label,
#tab-manage:checked + .tab-label,
#tab-settings:checked + .tab-label {
  border-bottom-color: #cf0;
  color: #e8e8e8;
}

.tab-label:hover {
  color: #e8e8e8;
}

.app-main .assets-eye {
  margin: 0 0 0 auto;
  padding: 0;
}

body:not(:has(#tab-assets:checked)) .assets-eye {
  display: none;
}

.app-main .eye-toggle {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #8a8a8a;
  cursor: pointer;
}

.app-main .eye-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

.app-main .eye-toggle:hover,
.app-main .eye-toggle:focus-visible,
.app-main .eye-toggle[aria-pressed="true"] {
  color: #cf0;
}

.app-main .eye-toggle .eye-open,
.app-main .eye-toggle[aria-pressed="true"] .eye-shut {
  display: none;
}

.app-main .eye-toggle[aria-pressed="true"] .eye-open {
  display: block;
}

.app-main li.asset-row.not-trusted > a .asset-name,
.app-main li.asset-row.not-trusted > a .asset-value {
  color: #8a8a8a;
}

.panel-header {
  margin: 0 0 1.5rem;
  padding: 1rem 1rem 0.75rem;
  border: 1px solid #6b6b6b;
  border-radius: 14px;
  background: #1a1a1a;
}

.panel-summary {
  margin: 0 0 0.75rem;
}

.panel-surface {
  margin: 0 0 1.5rem;
  border: 1px solid #6b6b6b;
  border-radius: 14px;
  background: #1a1a1a;
}

.panel-surface .tab-row {
  align-items: flex-end;
  margin: 0;
  padding: 1rem 1rem 0;
  border-bottom: 1px solid #3a3a3a;
}

.panel-surface .tab-label {
  margin: 0;
  padding-bottom: 0.75rem;
}

.app-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  line-height: 0;
}

.app-mark img {
  display: block;
  width: auto;
  height: 34px;
}

.panel-surface .tab-row .app-mark {
  transform: translateY(calc(-0.75rem / 2 - 1px));
}

.panel-surface .tab-panel,
.panel-surface .panel-body {
  padding: 0 1rem;
}

.panel-surface .form-panel {
  padding: 1rem 0;
}

.panel-surface .form-panel:not(:last-child) {
  border-bottom: 1px solid #3a3a3a;
}

.form-panel .form-head {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.form-panel .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0 1rem;
}

.form-cancel {
  padding: 0;
  border: 0;
  background: none;
  color: #8a8a8a;
  font: inherit;
  cursor: pointer;
}

.form-cancel:hover,
.form-cancel:focus-visible {
  color: #cf0;
}

.app-main .panel-surface > ul {
  padding: 0 1rem;
}

.app-main .panel-total {
  margin: 0 0 0.75rem;
  color: #e8e8e8;
  font-size: 1rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.app-main .panel-total.panel-headline {
  color: #f5f5f5;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wallet-line {
  margin: 0 0 1rem;
}

.app-main .wallet-line p {
  display: inline;
  margin: 0;
}

.wallet-line .wallet-action {
  display: inline;
}

.wallet-line .wallet-action button {
  vertical-align: middle;
}

.wallet-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
}

.wallet-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #f5f5f5;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trx-head .wallet-name {
  flex: 0 1 auto;
}

.wallet-head h2 {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

.wallet-rename {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.wallet-rename[hidden] {
  display: none;
}

.wallet-rename input[name="label"] {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid #6b6b6b;
  border-radius: 8px;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wallet-rename input[name="label"]:focus {
  outline: none;
  border-color: #cf0;
}

.wallet-rename button {
  flex: none;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: #cf0;
  color: #000;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wallet-rename button:hover {
  background: #d9ff33;
}

.wallet-rename button:focus-visible {
  outline: 2px solid #cf0;
  outline-offset: 2px;
}

.wallet-action {
  flex: none;
}

.app-main .wallet-address {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
}

.wallet-copy {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #8a8a8a;
  cursor: pointer;
}

.wallet-copy:hover,
.wallet-copy:focus-visible {
  color: #cf0;
}

.wallet-copy svg {
  display: block;
  width: 14px;
  height: 14px;
}

.wallet-copy .wallet-copy-check {
  display: none;
}

.wallet-copy.copied {
  color: #cf0;
}

.wallet-copy.copied .wallet-copy-glyph {
  display: none;
}

.wallet-copy.copied .wallet-copy-check {
  display: block;
}

.app a.linkout {
  display: inline-flex;
  flex: none;
  align-items: center;
  vertical-align: -2px;
  color: #8a8a8a;
}

.app a.linkout:hover,
.app a.linkout:focus-visible {
  color: #cf0;
}

.linkout svg {
  display: block;
  width: 16px;
  height: 16px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.app-main ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-main li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #3a3a3a;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.app-main li:last-child {
  border-bottom: 0;
}

.app-main ul:not(:last-of-type) > li:last-child {
  border-bottom: 1px solid #3a3a3a;
}

.app-main li.asset-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-main li.asset-row:has(> a) {
  padding: 0;
}

.app-main li.asset-row > a {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem 0;
}

.app-main li.asset-row:has(a:focus),
.app-main li.asset-row:has(button:focus-visible) {
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  background: #171717;
  box-shadow: inset 2px 0 0 #cf0;
}

.app-main li.asset-row a:focus {
  outline: none;
}

.app-main li.asset-row .asset-name button:focus-visible {
  outline: none;
}

.asset-icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
}

.asset-letter,
.asset-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #262626;
  color: #8a8a8a;
  font-size: 0.875rem;
  font-weight: 600;
}

.asset-glyph svg {
  display: block;
  width: 16px;
  height: 16px;
}

.asset-img {
  position: absolute;
  inset: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #262626;
  object-fit: cover;
}

.asset-badge {
  position: absolute;
  right: -0.25rem;
  bottom: -0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.asset-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-date {
  flex: none;
  color: #8a8a8a;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.asset-value {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.asset-mark {
  flex: none;
  display: flex;
  align-items: center;
  color: #8a8a8a;
}

.asset-mark svg {
  display: block;
  width: 16px;
  height: 16px;
}

.app-main p {
  margin: 0 0 1rem;
  color: #8a8a8a;
  font-size: 0.875rem;
}

.app-main .login-error {
  color: #ff8a8a;
  font-size: 0.875rem;
}

.app-main li form {
  display: inline;
  margin-left: 0.5rem;
}

.app-main li form button,
.app-main .key-shown button {
  padding: 0.25rem 0.5rem;
  border: 1px solid #6b6b6b;
  border-radius: 8px;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.app-main li form button:hover,
.app-main .key-shown button:hover {
  border-color: #cf0;
  color: #cf0;
}

.wallet-action button {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: #8a8a8a;
  cursor: pointer;
}

.wallet-action button:disabled {
  cursor: default;
}

.wallet-action button:hover:not(:disabled),
.wallet-action button:focus-visible {
  color: #cf0;
}

@keyframes wallet-refreshing-spin {
  to {
    transform: rotate(1turn);
  }
}

.wallet-action button.wallet-refreshing svg {
  animation: wallet-refreshing-spin 1s linear infinite;
}

.wallet-action svg {
  display: block;
  width: 16px;
  height: 16px;
}

.app-main li.settings-row > form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-left: 0;
}

.app-main li.settings-row > form button,
.app-main li.settings-row .asset-name button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.app-main li.settings-row form button:hover,
.app-main li.settings-row form button:focus-visible,
.app-main li.settings-row .asset-name button:hover,
.app-main li.settings-row .asset-name button:focus-visible {
  color: #cf0;
}

.app-main li.settings-row > form .asset-name {
  flex: 0 1 auto;
}

.wallet-copy-row .wallet-copy-done {
  display: none;
}

.wallet-copy-row.copied .wallet-copy-word {
  display: none;
}

.wallet-copy-row.copied .wallet-copy-done {
  display: inline;
}

dialog.confirm {
  box-sizing: border-box;
  max-width: 22rem;
  padding: 1.5rem;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  background: #1a1a1a;
  color: #e8e8e8;
  font: 16px/1.5 system-ui, sans-serif;
}

dialog.confirm:focus-visible {
  outline: none;
}

dialog.confirm::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

dialog.confirm .confirm-text {
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

dialog.confirm .confirm-choices {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin: 0;
}

dialog.confirm .confirm-choices button {
  padding: 0.5rem 1rem;
  border: 1px solid #6b6b6b;
  border-radius: 8px;
  background: none;
  color: #e8e8e8;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

dialog.confirm .confirm-choices button:hover {
  border-color: #cf0;
  color: #cf0;
}

dialog.confirm .confirm-choices button:focus-visible {
  outline: 2px solid #cf0;
  outline-offset: 2px;
}

dialog.confirm .confirm-choices .confirm-yes {
  border-color: #cf0;
  background: #cf0;
  color: #000;
  font-weight: 600;
}

dialog.confirm .confirm-choices .confirm-yes:hover {
  background: #d9ff33;
  color: #000;
}

.app-main .key-shown {
  color: #f5f5f5;
  overflow-wrap: anywhere;
}

a[x-apple-data-detectors],
a[href^="tel:"] {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

.load-more {
  height: 1px;
}

.conversation-unread .asset-name {
  color: #f5f5f5;
  font-weight: 600;
}

.unread-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cf0;
}

.message-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #3a3a3a;
}

.app-main .reply-row:last-child {
  border-bottom: 1px solid #3a3a3a;
}

.message-content {
  flex: 1 1 auto;
  min-width: 0;
}

.app-main .message-meta {
  margin: 0 0 0.25rem;
  color: #8a8a8a;
  font-size: 0.75rem;
}

.app-main .message-text {
  margin: 0;
  color: #e8e8e8;
  font-size: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
