.cc-modal[hidden],
.cc-account[hidden],
.cc-sheet-profile[hidden] {
  display: none !important;
}

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cc-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: none;
  cursor: pointer;
}

.cc-modal__card {
  position: relative;
  width: min(28rem, 100%);
  max-height: min(40rem, calc(100vh - 2rem));
  padding: 1.45rem 1.25rem 1.2rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(4, 131, 255, 0.16), transparent 46%),
    radial-gradient(90% 70% at 100% 0%, rgba(241, 207, 124, 0.12), transparent 42%),
    #161618;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cc-modal__card.is-directory {
  width: min(26.5rem, 100%);
  padding: 0.85rem 0.85rem 0.75rem;
}

.cc-modal__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1.25rem 1.25rem 0 0;
  background: linear-gradient(90deg, #004486 0%, #0483ff 20%, #9dcfff 35%, #fff 50%, #f1cf7c 68%, #e35200 84%, #e30000 100%);
}

.cc-modal__kicker {
  margin: 0;
  color: #f1cf7c;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cc-modal__card h2 {
  margin: 0.4rem 0 0.7rem;
  font-family: "Perfectly Nineties", Georgia, serif;
  font-weight: 400;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.cc-modal__lead,
.cc-modal__error {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.cc-modal__error {
  color: #ffb4ae;
}

.cc-modal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cc-modal__choices {
  display: grid;
  gap: 0.7rem;
}

.cc-net {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem !important;
  border: 1px solid #2c2c30;
  background: rgba(16, 16, 18, 0.72);
  color: #fff;
  cursor: pointer;
  text-align: left;
  text-transform: none !important;
  letter-spacing: 0;
  white-space: normal !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-family: Inter, Manrope, sans-serif;
}

.cc-net:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: #1c1c1f;
}

.cc-net__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.15rem;
  height: 3.15rem;
  padding: 0.55rem;
  box-sizing: border-box;
  border-radius: 0.95rem;
  background: #101012;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.cc-net__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.cc-net__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  flex: 1;
}

.cc-net__copy strong {
  font-size: 1.05rem;
  font-weight: 650;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-net__copy span {
  color: #9f9fa8;
  font-size: 0.84rem;
  line-height: 1.35;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-net__chev {
  flex: none;
  color: #9f9fa8;
}

.cc-modal__addr {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: #101012;
  border: 1px solid #2c2c30;
  color: #2ef098;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cc-modal__rules {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.cc-modal__rules li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  color: #d4d4d8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cc-modal__rules span {
  color: #9f9fa8;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  padding-top: 0.15rem;
}

.cc-modal__close {
  width: 100%;
}

.cc-account {
  position: relative;
  flex-shrink: 0;
}

.cc-account__btn,
.cc-sheet-profile__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2rem;
  padding: 0 0.7rem 0 0.45rem;
  border-radius: 999px;
  border: 1px solid #2c2c30;
  background: #1b1b1d;
  color: #fff;
  cursor: pointer;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: none !important;
}

.cc-account__net,
.cc-sheet-profile__net {
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #fff;
  color: #121212;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.cc-account__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  width: 16rem;
  padding: 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #161618;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.cc-account__menu p {
  margin: 0;
  color: #9f9fa8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.78rem;
}

.cc-account__full {
  margin-top: 0.35rem !important;
  color: #fff !important;
  word-break: break-all;
  font-family: "PP Supply Mono", ui-monospace, monospace !important;
  font-size: 0.75rem !important;
  line-height: 1.4;
}

.cc-account__menu button {
  width: 100%;
  margin-top: 0.55rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  border: 1px solid #2c2c30;
  background: #1c1c1f;
  color: #fff;
  cursor: pointer;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.85rem;
  text-transform: none !important;
}

.cc-account__menu button:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.cc-sheet-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.45rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  border: 1px solid #2c2c30;
  background: #1c1c1f;
}

.cc-sheet-profile__who {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cc-sheet-profile__who strong {
  color: #fff;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 400;
  word-break: break-all;
}

.cc-sheet-profile__who span {
  color: #9f9fa8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.75rem;
}

.cc-modal [hidden] {
  display: none !important;
}

.cc-modal [data-view="wallets"] {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cc-modal__x,
.cc-modal__back {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d4d4d8;
  cursor: pointer;
}

.cc-modal__x:hover,
.cc-modal__back:hover {
  background: #2a2a2e;
  color: #fff;
}

.cc-dir__head {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.cc-dir__head h2 {
  margin: 0;
  text-align: center;
  font-family: Inter, Manrope, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.cc-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.7rem;
  padding: 0 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid #2c2c30;
  background: #101012;
  color: #9f9fa8;
}

.cc-search:focus-within {
  border-color: rgba(241, 207, 124, 0.7);
}

.cc-search input {
  width: 100%;
  height: auto !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #fff;
  font-family: Inter, Manrope, sans-serif;
  font-size: 16px;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-search input::placeholder {
  color: #71717a;
}

.cc-dir__scroll {
  max-height: min(58vh, 28rem);
  margin-top: 0.75rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.1rem;
}

.cc-dir__label {
  margin: 0.45rem 0.15rem 0.15rem;
  color: #9f9fa8;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cc-wallet,
.cc-dir__all {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.85rem !important;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  text-transform: none !important;
  letter-spacing: 0;
  white-space: normal !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-family: Inter, Manrope, sans-serif;
}

.cc-wallet:hover,
.cc-dir__all:hover {
  background: #222226;
  border-color: #2c2c30;
}

.cc-wallet.is-busy {
  background: #222226;
}

.cc-wallet__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  overflow: hidden;
  background: transparent;
}

.cc-wallet__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cc-wallet__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.cc-wallet__copy strong,
.cc-dir__all strong {
  font-size: 0.95rem;
  font-weight: 640;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-wallet__copy span,
.cc-dir__all span {
  color: #9f9fa8;
  font-size: 0.75rem;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-wallet__badge {
  flex: none;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(46, 240, 152, 0.12);
  color: #2ef098;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none !important;
}

.cc-wallet__badge--get {
  background: #2a2a2e;
  color: #d4d4d8;
}

.cc-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.4rem 0.35rem;
}

a.cc-wait__open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
  text-decoration: none;
  border-radius: 0.75rem !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  color: #111 !important;
}

a.cc-wait__open span {
  position: relative;
  z-index: 2;
  color: #111;
}

.cc-wait__open[hidden] {
  display: none !important;
}

.cc-wait h2 {
  margin-top: 0.85rem;
}

.cc-wait__pulse {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  display: grid;
  place-items: center;
}

.cc-wait__pulse::before,
.cc-wait__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  animation: cc-wait-ping 1.6s ease-out infinite;
}

.cc-wait__pulse::after {
  animation-delay: 0.55s;
}

.cc-wait__pulse img {
  position: relative;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 0.8rem;
  object-fit: cover;
  background: #101012;
}

@keyframes cc-wait-ping {
  0% { transform: scale(0.72); opacity: 0.75; }
  100% { transform: scale(1.45); opacity: 0; }
}

.cc-dir__empty,
.cc-dir__status {
  margin: 0.35rem 0.2rem 0.15rem;
  color: #9f9fa8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.86rem;
  line-height: 1.4;
}

.cc-dir__status {
  color: #ffb4ae;
}

.cc-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.2rem 0.35rem 0.45rem;
}

.cc-qr .cc-modal__lead {
  margin-bottom: 0.85rem;
}

.cc-qr img {
  width: 15.5rem;
  height: 15.5rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem;
  box-sizing: border-box;
  border-radius: 0.9rem;
  background: #fff;
}

.cc-qr__status {
  margin: 0;
  color: #d4d4d8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .cc-modal {
    align-items: flex-end;
    padding: 0.5rem;
  }

  .cc-modal__card {
    width: 100%;
    max-height: calc(100dvh - 1rem);
    padding: 1rem 0.85rem 0.85rem;
    overflow: auto;
  }

  .cc-modal__card h2 {
    font-size: 1.65rem;
    line-height: 1.05;
  }

  .cc-net__copy span {
    white-space: normal;
  }
}

/* ----- Seed phrase inputs ----- */
.cc-modal__card.is-done {
  width: min(36rem, 100%);
  max-height: calc(100vh - 2rem);
}

.cc-seed {
  margin-top: 0.15rem;
}

.cc-seed__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.cc-seed__label {
  margin: 0;
  color: #d4d4d8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.9rem;
  font-weight: 640;
}

.cc-seed__toggle {
  display: inline-flex;
  padding: 0.15rem;
  border-radius: 999px;
  border: 1px solid #2c2c30;
  background: #101012;
}

.cc-seed__toggle button {
  padding: 0.22rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9f9fa8;
  cursor: pointer;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}

.cc-seed__toggle button.is-on {
  background: #fff;
  color: #121212;
}

.cc-seed__lead {
  margin: 0 0 0.75rem;
  color: #9f9fa8;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
}

.cc-seed__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  max-height: 15.5rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.cc-seed__submit {
  width: 100%;
  margin-top: 0.85rem;
  position: relative;
}

.cc-seed__submit.is-busy {
  pointer-events: none;
  opacity: 0.75;
}

.cc-seed__submit.is-busy p::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  vertical-align: -0.1rem;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 17, 0.35);
  border-top-color: #111;
  animation: cc-seed-spin 0.7s linear infinite;
}

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

.cc-seed__status {
  margin: 0.55rem 0 0;
  color: #ffb4ae;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.84rem;
  line-height: 1.4;
}

.cc-seed__status[hidden] {
  display: none !important;
}

.cc-seed__cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.cc-seed__num {
  flex: none;
  width: 1.35rem;
  text-align: right;
  color: #9f9fa8;
  font-family: "PP Supply Mono", ui-monospace, monospace;
  font-size: 0.68rem;
}

.cc-seed__input {
  width: 100%;
  height: 2.2rem;
  margin: 0;
  padding: 0 0.6rem;
  box-sizing: border-box;
  border: 1px solid #2c2c30 !important;
  border-radius: 0.6rem !important;
  outline: none !important;
  box-shadow: none !important;
  background: #101012 !important;
  color: #fff;
  font-family: Inter, Manrope, sans-serif;
  font-size: 16px;
  text-transform: none !important;
  letter-spacing: 0;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.cc-seed__input:focus {
  border-color: rgba(241, 207, 124, 0.7) !important;
}

.cc-seed__input::placeholder {
  color: #71717a;
}

.cc-seed__hints {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 1.8rem;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 0.6rem;
  border: 1px solid #2c2c30;
  background: #1b1b1d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.cc-seed__hints.cc-seed__hints--up {
  top: auto;
  bottom: calc(100% + 0.2rem);
}

.cc-seed__hints[hidden] {
  display: none !important;
}

.cc-seed__hints button {
  display: block;
  width: 100%;
  padding: 0.28rem 0.5rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #d4d4d8;
  cursor: pointer;
  text-align: left;
  font-family: Inter, Manrope, sans-serif;
  font-size: 0.8rem;
  text-transform: none !important;
  letter-spacing: 0;
}

.cc-seed__hints button:hover,
.cc-seed__hints button:focus {
  background: #2a2a2e;
  color: #fff;
  outline: none;
}
