:root {
  --bg: #f7f7f6;
  --ink: #050505;
  --muted: #636363;
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.32);
  --panel: rgba(255, 255, 255, 0.96);
  --black: #000;
  --white: #fff;
  --green: #16b364;
  --red: #9f2424;
}

* {
  box-sizing: border-box;
}

body {
  width: 410px;
  min-height: 520px;
  margin: 0;
  color: var(--ink);
  font-family:
    ui-serif,
    Georgia,
    "Times New Roman",
    serif;
  background:
    linear-gradient(135deg, #fff, #efefee),
    var(--bg);
}

.wallet-shell {
  padding: 18px;
}

.hero,
.screen-head,
.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero {
  margin-bottom: 16px;
}

.eyebrow,
label,
.fineprint {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 36px;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

h2 {
  margin-top: 3px;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0 0 9px;
  font-size: 18px;
}

.view {
  display: none;
  min-height: 384px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
}

.view.active {
  display: block;
}

.entry-card {
  display: grid;
  gap: 14px;
  padding-top: 96px;
}

.flow-step,
.login-panel {
  display: none;
}

.flow-step.active,
.login-panel.active {
  display: block;
}

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

.word-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f8f8;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.word-pill span {
  color: var(--muted);
}

.verify-fields {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.verify-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 8px;
}

.login-head {
  align-items: center;
}

.login-head > div {
  flex: 1;
}

.mode-select {
  width: auto;
  min-width: 116px;
  margin: 0;
  padding: 10px 12px;
  border-color: #000;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-weight: 900;
}

.compact-status:empty {
  display: none;
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--white);
  background: var(--black);
  font: 700 11px "Cascadia Code", Consolas, monospace;
  text-transform: uppercase;
}

.lock-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #858585;
}

.lock-badge.unlocked::before {
  background: var(--green);
}

.status {
  min-height: 42px;
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.status.error {
  border-color: rgba(159, 36, 36, 0.45);
  color: #821e1e;
  background: rgba(159, 36, 36, 0.055);
}

.status.success {
  border-color: rgba(22, 179, 100, 0.45);
  color: #0e7742;
  background: rgba(22, 179, 100, 0.06);
}

.back-btn,
.icon-btn {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: "Cascadia Code", Consolas, monospace;
}

input.input-error,
textarea.input-error {
  border-color: rgba(159, 36, 36, 0.72);
  box-shadow: 0 0 0 3px rgba(159, 36, 36, 0.08);
}

code {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0 0 12px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafafa;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-address-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.wallet-address-status::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
}

.wallet-address-status span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 auto;
  border: 1px solid #000;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 15px;
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.metrics div,
.asset-row,
.sub-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f8f8;
}

.metrics div {
  padding: 10px;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 17px;
}

.metrics span {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.asset-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.asset-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.asset-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--black);
}

.asset-row strong,
.asset-row small {
  display: block;
}

.asset-row small {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfbfb;
  color: var(--ink);
  font: 12px "Cascadia Code", Consolas, monospace;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

textarea[readonly] {
  color: var(--muted);
  background: #f4f4f4;
}

button {
  min-height: 48px;
  border: 1px solid #000;
  border-radius: 16px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

button.large {
  min-height: 62px;
  font-size: 20px;
}

button.compact {
  min-height: 38px;
  padding: 7px 12px;
}

button.ghost {
  background: #fff;
  color: #000;
}

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

button.full {
  width: 100%;
}

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

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

.restore-box,
.sub-card {
  margin-top: 14px;
  padding: 13px;
}

.restore-box summary,
.secret-card summary {
  cursor: pointer;
  font-weight: 900;
}

.origin-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  color: var(--muted);
  font: 12px "Cascadia Code", Consolas, monospace;
}

.origin-pill {
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fineprint {
  margin: 12px 2px 0;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}
