/* The app pages (launch, add, maker, makers), in the same vocabulary as the home page:
   #0b0b0b cards with a hairline ring, grey labels, one accent for money and the primary button. */

.app-hero { padding-top: 72px; }
.app-hero h1 { font-size: clamp(36px, 5vw, 68px); }
.app-sec { padding-top: 40px; }
main > .app-sec:last-child { padding-bottom: 96px; }

.app-wallet { border: 0; cursor: pointer; font: inherit; }
.app-wallet.is-on { color: #fff !important; background: rgba(255, 255, 255, 0.08); }
.app-wallet.is-on:hover { background: rgba(255, 255, 255, 0.14); }
.eh-top .eh-nav-link[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.08); }

.app-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 12px; align-items: start; }
.app-card { padding: 24px; border-radius: 16px; background: #0b0b0b; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 18px; font-size: 14px; }
.app-card small { display: block; font-size: 13px; color: var(--eh-dim); }
.app-side { gap: 0; position: sticky; top: 84px; }
.app-flush { padding: 8px 20px 12px; }
.app-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.app-stack { display: flex; flex-direction: column; gap: 12px; }
.app-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app-hint { font-size: 12px; color: #5d6266; font-weight: 400; }
.app-field input, .app-field textarea, .app-setgrid input {
  width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: #151515; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); font: inherit; font-size: 15px; outline: none; transition: box-shadow var(--eh-fast) ease;
}
.app-field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.app-field input:focus, .app-field textarea:focus, .app-setgrid input:focus { box-shadow: inset 0 0 0 1px var(--eh-mint); }
.app-field input::placeholder, .app-field textarea::placeholder { color: #5d6266; }
.app-unit { position: relative; display: block; }
.app-unit em { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font-style: normal; color: var(--eh-dim); pointer-events: none; }
.app-unit input { padding-right: 48px; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.app-image-box { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: #151515; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); cursor: pointer; overflow: hidden; transition: box-shadow var(--eh-fast) ease; }
.app-image-box:hover, .app-image.is-drag .app-image-box { box-shadow: inset 0 0 0 1px var(--eh-mint); }
.app-image-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.app-image-box img[src] { display: block; }
.app-image-box em { font-style: normal; text-align: center; color: var(--eh-soft); font-size: 14px; line-height: 1.5; }

.app-more summary { cursor: pointer; color: var(--eh-soft); list-style: none; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.app-more summary::-webkit-details-marker { display: none; }
.app-more summary::after { content: "+"; color: var(--eh-dim); }
.app-more[open] summary::after { content: "−"; }

.app-submit { height: 46px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; transition: background-color var(--eh-fast) ease, opacity var(--eh-fast) ease; }
.app-submit:hover { background: var(--acc-hi); }
.app-submit:disabled { opacity: .55; cursor: progress; }
.app-err { margin: 0; min-height: 1em; color: #fca5a5; font-size: 13px; line-height: 1.45; }
.app-err:empty { display: none; }
.app-total { font-weight: 700; }
.app-total dd { font-size: 15px; }

.app-steps[hidden], .app-coin[hidden] { display: none; }
.app-steps { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.app-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; color: #5d6266; font-size: 13.5px; }
.app-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #151515; font-size: 12px; color: var(--eh-dim); }
.app-steps li.is-now { color: #fff; }
.app-steps li.is-now::before { background: rgba(255, 255, 255, 0.12); color: #fff; animation: app-pulse 1.2s ease-in-out infinite; }
.app-steps li.is-done { color: var(--eh-soft); }
.app-steps li.is-done::before { content: "✓"; background: rgb(var(--acc-rgb) / 0.16); color: var(--eh-mint); }
.app-steps li.is-bad { color: #fca5a5; }
@keyframes app-pulse { 50% { opacity: .5; } }

.app-coin { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: #111; }
.app-coin dl { margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.app-coin dt { font-size: 12px; color: var(--eh-dim); }
.app-coin dd { margin: 4px 0 0; font-weight: 500; }

/* maker page */
.app-owner { margin-top: 12px; gap: 14px; }
.app-owner-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.app-actions { flex-wrap: wrap; }
.app-actions button, .app-set-actions button { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; }
.eh-ghost.is-danger, .eh-app.is-danger { color: #fca5a5 !important; background: rgba(248, 113, 113, 0.12); }
.eh-ghost.is-danger:hover, .eh-app.is-danger:hover { background: rgba(248, 113, 113, 0.2); }
.app-h2 { margin: 48px 0 14px; font-weight: 500; font-size: 22px; letter-spacing: -0.01em; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.app-table { margin-top: 0; font-size: 13.5px; }
.app-table th { padding-top: 10px; }
.app-table a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.app-table a:hover { border-color: #fff; }
.app-table .is-down { color: #fca5a5; }
.app-setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.app-setgrid > label { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: #121212; min-width: 0; }
.app-setgrid > label.is-changed { box-shadow: inset 0 0 0 1px var(--eh-mint); }
.app-setgrid input { height: 34px; font-size: 14px; }
.app-setgrid input:disabled { color: #5d6266; }
.app-setgrid em { font-style: normal; font-size: 11.5px; color: #5d6266; }
.app-setgrid .app-toggles { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--eh-soft); }
.app-setgrid .app-toggles input { width: auto; height: auto; accent-color: var(--eh-mint); box-shadow: none; }
.app-foot { margin-top: 24px; }
.eh-facts .is-money em { color: var(--eh-mint); }
.eh-fact small { display: block; margin-top: 6px; font-size: 12px; color: #5d6266; }

/* makers list */
.app-filter { margin-top: 28px; }
.app-makers { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.app-maker { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: #131313; color: #fff; text-decoration: none; transition: background-color var(--eh-fast) ease; }
.app-maker:hover { background: #181818; }
.app-maker-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.app-maker-top b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-maker-top em { font-style: normal; font-size: 12.5px; color: var(--eh-dim); }
.app-maker dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-maker dt { font-size: 12px; color: var(--eh-dim); }
.app-maker dd { margin: 4px 0 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.app-empty-card { grid-column: 1 / -1; padding: 40px 24px; border-radius: 14px; background: #0b0b0b; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); color: var(--eh-dim); text-align: center; }
.app-empty-card a { color: #fff; }

/* wallet picker */
.app-wallet-list { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 14px; }
.app-wallet-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: #151515; color: #fff; text-align: left; text-decoration: none; cursor: pointer; font: inherit; transition: background-color var(--eh-fast) ease; }
.app-wallet-row:hover { background: #1c1c1c; }
.app-wallet-row img, .app-wallet-row i { width: 32px; height: 32px; border-radius: 8px; }
.app-wallet-row i { display: grid; place-items: center; background: #232323; font-style: normal; font-weight: 700; color: var(--eh-soft); }
.app-wallet-row b { font-weight: 500; font-size: 15px; }
.app-wallet-row small { font-size: 12.5px; color: var(--eh-mint); }
.app-wallet-row.is-missing small { color: var(--eh-dim); }
.app-wallets .ap-note { margin: 0 0 16px; }

/* toast and dialog */
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; translate: -50% 12px; max-width: min(520px, calc(100% - 32px)); padding: 12px 16px; border-radius: 12px; background: #151515; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, .6); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 160ms ease, translate 160ms ease; }
#toast.is-on { opacity: 1; translate: -50% 0; }
#toast.is-bad { color: #fca5a5; }
.app-dialog { max-width: min(440px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 16px; background: #0c0c0c; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 80px rgba(0, 0, 0, .7); font-family: var(--eh-font); }
.app-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.app-dialog h3 { margin: 0; font-weight: 500; font-size: 20px; }
.app-dialog p { margin: 10px 0 20px; color: var(--eh-dim); font-size: 15px; line-height: 1.5; }
.app-dialog input { width: 100%; box-sizing: border-box; height: 42px; margin: -6px 0 18px; padding: 0 12px; border: 0; border-radius: 10px; background: #151515; color: #fff; font: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.app-dialog button { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; }

@media (max-width: 1023px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-side { position: static; }
}
@media (max-width: 809px) {
  .app-hero { padding: 48px 16px 0; }
  .app-card { padding: 18px; }
  .app-row2, .app-row3 { grid-template-columns: 1fr; }
  .app-image .app-image-box { aspect-ratio: auto; height: 160px; }
  .app-flush { padding: 4px 12px 8px; overflow-x: auto; }
  .app-maker dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
