:root {
  --red: #df2029;
  --white: #fffaf2;
  --line: rgb(255 250 242 / 45%);
  color: var(--white);
  background: var(--red);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; display: grid; place-items: center; padding: 28px 24px 44px; }
main { width: min(100%, 420px); min-width: 0; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button, .restore-link { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { background: none; border: 0; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 2px dashed var(--white); outline-offset: 5px; }
::selection { background: var(--white); color: var(--red); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.coin { --coin-size: min(600px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; width: var(--coin-size); height: calc(var(--coin-size) * .8); margin: 0 0 18px; padding: 0; overflow: hidden; cursor: grab; touch-action: pinch-zoom; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.coin[data-dragging='true'] { cursor: grabbing; }
#ascii-coin { display: block; flex-shrink: 0; font-family: inherit; font-size: calc(var(--coin-size) / 61); line-height: 1; letter-spacing: 0; white-space: pre; text-align: left; -webkit-user-select: none; user-select: none; }
.wallet-setup { display: grid; justify-items: center; gap: 20px; padding: 0 0 20px; }
.wallet-setup .primary { min-width: 225px; }
.primary { padding: 16px 22px; min-height: 56px; color: var(--red); background: var(--white); border: 1px solid var(--white); font-size: 16px; }
.primary:hover:not(:disabled) { background: transparent; color: var(--white); }
.primary:active:not(:disabled) { transform: translateY(1px); }
.restore-link, .text-button { font-size: 13px; }
.restore-link { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; }
.restore-link:hover, .text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.restore-link:has(input:disabled) { opacity: .4; cursor: default; }
.restore-link:has(input:focus-visible) { outline: 2px dashed var(--white); outline-offset: 5px; }
.balance-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 32px; }
.balance { margin: 0; font-size: 30px; letter-spacing: -.06em; overflow-wrap: anywhere; }
.balance > span:last-child { font-size: 15px; letter-spacing: 0; }
.refresh { font-size: 24px; min-width: 44px; min-height: 44px; padding: 4px; }
.refresh:hover:not(:disabled) { transform: rotate(-30deg); }
input:not([type='file']) { display: block; width: 100%; min-width: 0; min-height: 56px; padding: 15px 17px; background: transparent; border: 1px solid var(--line); font-size: 18px; }
input::placeholder { color: var(--white); opacity: .65; font-size: 15px; }
input:hover { border-color: var(--white); }
.send-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
#amount { appearance: textfield; -moz-appearance: textfield; }
#amount::-webkit-inner-spin-button, #amount::-webkit-outer-spin-button { appearance: none; margin: 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr 1.4fr; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { min-width: 0; min-height: 46px; padding: 10px 4px; font-size: 14px; border-bottom: 2px solid transparent; opacity: .7; }
.tabs button:hover { opacity: 1; }
.tabs button[aria-selected='true'] { border-bottom-color: var(--white); opacity: 1; }
.tab-panels { min-height: 126px; }
.receive-panel { padding-top: 3px; }
.address { display: flex; align-items: center; gap: 18px; width: 100%; padding: 12px 0; text-align: left; }
#wallet { flex: 1; min-width: 0; font: inherit; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; user-select: all; }
.address > span { font-size: 25px; }
.address:hover #wallet { text-decoration: underline; text-underline-offset: 4px; }
.hint { font-size: 12px; line-height: 1.6; margin: 10px 0; opacity: .8; text-align: center; }
.hint:empty { display: none; }
.history { list-style: none; padding: 0; margin: 0; max-height: 230px; overflow-y: auto; }
.history li + li { border-top: 1px solid rgb(255 250 242 / 20%); }
.transaction { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; text-decoration: none; font-size: 13px; }
.transaction:hover { text-decoration: underline; }
.transaction time { font-size: 11px; opacity: .8; text-align: right; }
.transaction[data-failed='true'] { text-decoration: underline wavy; text-underline-offset: 4px; }
.text-button { padding: 8px 0; min-height: 44px; }
#backup-retry { display: block; margin: 8px auto 0; text-decoration: underline; }
.status { margin-top: 20px; text-align: center; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.status[data-tone='error'] { border-left: 2px solid var(--white); padding-left: 12px; text-align: left; }
#status:empty { display: none; }
#pending { display: block; margin-top: 8px; min-height: 44px; padding-block: 10px; }
noscript { display: block; text-align: center; font-size: 12px; }
@media (max-height: 700px), (max-width: 380px) {
  body { padding-block: 16px 28px; }
  .coin { margin-bottom: 10px; }
  .balance-row { margin-bottom: 22px; }
}
@media (max-width: 340px) {
  body { padding-inline: 16px; }
  .tabs button { font-size: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .coin { --coin-size: min(320px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
