/* ───────── App shell (app.html, coin.html, docs.html) ───────── */
[hidden] { display: none !important; }
.app-body { background: radial-gradient(900px 500px at 85% -10%, #ffe1ef 0%, transparent 60%), radial-gradient(700px 500px at -10% 20%, #fff0d8 0%, transparent 60%), var(--bg); background-attachment: fixed; }
.app-body .nav__links { margin-left: 32px; margin-right: auto; }
.nav__links a[aria-current="page"] { color: var(--ink); background: #fff; box-shadow: var(--shadow-soft); }
.wallet-btn.is-connected { background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); font-family: var(--f-mono); font-size: 13px; }
.app-main { padding: 36px 0 80px; min-height: 70vh; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.center { display: flex; justify-content: center; margin-top: 28px; }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.back { display: inline-block; margin-bottom: 18px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.back:hover { color: var(--ink); }

.net-banner { width: min(var(--container), 100% - 32px); margin: 14px auto 0; padding: 12px 18px; border-radius: 14px; background: #fff4e0; border: 1px solid #ffd9a0; color: #7a4a00; font-size: 14px; }
.net-banner a { color: #c0396f; font-weight: 600; text-decoration: underline; }
.net-banner--local { background: #eef4ff; border-color: #c9dbff; color: #23407a; }

.app-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.app-head h1 { font-size: clamp(30px, 4vw, 44px); }
.app-head .sub { margin-top: 10px; }

.tabs, .seg { display: inline-flex; padding: 5px; gap: 4px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-soft); }
.tabs button, .seg button { border: 0; background: none; padding: 10px 18px; border-radius: 999px; font: 600 14px var(--f-body); color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; }
.tabs button[aria-selected="true"], .seg button[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(255, 92, 130, .8); }
#trade[data-side="sell"] .seg button[aria-selected="true"] { background: linear-gradient(120deg, #3d3340, #23181f); box-shadow: none; }

.list-head { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 14px; }

/* ── coin cards ── */
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.coin { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--r-md); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
a.coin:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(60,20,40,.04), 0 24px 44px -16px rgba(120,40,70,.22); }
.coin__top { display: flex; align-items: center; gap: 12px; }
.coin__id { min-width: 0; }
.coin__id b { display: block; font: 600 17px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin__id span { font-size: 13px; color: var(--ink-3); }
.coin__desc { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coin__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coin__stats div { background: #fff; border-radius: 12px; padding: 10px 12px; }
.coin__stats small { display: block; font-size: 12px; color: var(--ink-3); }
.coin__stats b { font-size: 15px; }
.coin__floor { color: var(--ink-3); font-size: 12.5px; }
.coin__floor b { color: var(--ink); }
.floorbar { height: 6px; border-radius: 6px; background: #f0e6e8; overflow: hidden; }
.floorbar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--orange), var(--sun)); }
.is-skeleton { min-height: 230px; background: linear-gradient(100deg, rgba(255,255,255,.5) 30%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.5) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.avatar { position: relative; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); display: grid; place-items: center; overflow: hidden; color: #fff; font: 700 calc(var(--s) * .4) var(--f-display); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px -10px rgba(120, 30, 60, .6); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.empty { grid-column: 1 / -1; padding: 48px 24px; border-radius: var(--r-md); text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty b { font: 600 20px var(--f-display); }
.empty p { color: var(--ink-2); }
.empty a { color: #c0396f; font-weight: 600; }
.empty .btn { margin-top: 10px; }

/* ── launch ── */
.launch { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.launch__form { padding: 30px; border-radius: var(--r-lg); display: grid; gap: 16px; }
.launch__form h2 { font-size: 26px; }
.launch__form .sub { margin-top: -6px; font-size: 15px; }
.launch__preview { position: sticky; top: 100px; display: grid; gap: 4px; }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.input { display: grid; gap: 7px; }
.input > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.input em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.input input, .input textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 13px 15px;
  font: 500 15px var(--f-body); color: var(--ink); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.input input:focus, .input textarea:focus, .amount input:focus { outline: none; border-color: #ffb0cf; box-shadow: 0 0 0 4px rgba(255, 79, 176, .12); }
.facts { list-style: none; margin: 4px 0; padding: 16px 18px; border-radius: 14px; background: var(--grad-soft); display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.facts b { color: var(--ink); }
.fine a { color: #c0396f; }

/* ── coin page ── */
.coin-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.coin-head h1 { font-size: clamp(26px, 3.4vw, 38px); }
.coin-head h1 span { color: var(--ink-3); font-size: .6em; font-weight: 500; }
.coin-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.coin-head__meta a { color: #c0396f; font-weight: 600; }
.coin-head__desc { margin-top: 12px; color: var(--ink-2); max-width: 720px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; box-shadow: var(--shadow-soft); border-radius: 999px; padding: 6px 12px; font: 500 13px var(--f-mono); color: var(--ink-2); cursor: pointer; }
.chip:hover { color: var(--ink); }
.copy-ic { width: 11px; height: 11px; border: 1.6px solid currentColor; border-radius: 3px; box-shadow: 3px -3px 0 -1.6px #fff, 3px -3px 0 0 currentColor; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #fff; border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-soft); display: grid; gap: 4px; }
.stat small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat b { font: 600 22px var(--f-display); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-3); }
.stat--brand { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.stat--brand small, .stat--brand span { color: rgba(255,255,255,.85); }

.floor-meter { margin: 12px 0 28px; padding: 14px 18px; border-radius: var(--r-md); display: grid; gap: 8px; }
.floor-meter__bar { height: 8px; border-radius: 8px; background: #f0e6e8; overflow: hidden; }
.floor-meter__bar span { display: block; height: 100%; width: 1%; border-radius: 8px; background: linear-gradient(90deg, var(--orange), var(--sun)); transition: width .8s cubic-bezier(.2,.8,.2,1); }

.coin-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.col { display: grid; gap: 16px; }
.panel { border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; }
.panel h3 { font-size: 17px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.slip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.slip input { width: 58px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font: 500 13px var(--f-mono); text-align: right; background: #fff; }
.amount { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 6px 18px 6px 6px; box-shadow: inset 0 0 0 1px var(--line); }
.amount input { flex: 1; min-width: 0; border: 0; background: none; padding: 14px 12px; font: 600 26px var(--f-display); color: var(--ink); border-radius: 14px; }
.amount input::placeholder { color: #cfc4cc; }
.amount span { font: 600 15px var(--f-body); color: var(--ink-2); }
.amount__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick .chip { font-family: var(--f-body); font-weight: 600; padding: 5px 10px; }
.quote { min-height: 44px; display: grid; align-content: center; gap: 2px; font-size: 15px; }
.quote b { font-family: var(--f-display); font-weight: 600; }
.quote small { color: var(--ink-3); font-size: 12.5px; }
.positions { display: grid; gap: 8px; }
.pos { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pos:last-child { border-bottom: 0; }
.pos small { color: var(--ink-3); }
.pos span { width: 100%; text-align: right; font-size: 13px; color: var(--ink-3); }
.creator__row { display: flex; justify-content: space-between; align-items: center; }
.creator__row b { font: 600 22px var(--f-display); }
.trades { display: grid; gap: 2px; font-size: 14px; }
.trade-row { display: grid; grid-template-columns: 56px 1fr 1.3fr 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.trade-row:last-child { border-bottom: 0; }
.trade-row a { color: inherit; }
.pill-side { font-size: 12px; font-weight: 700; padding: 3px 0; border-radius: 999px; text-align: center; }
.pill-side.is-buy { background: #e5f7ec; color: #18864b; }
.pill-side.is-sell { background: #ffe8ec; color: #c22a4b; }
.how ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14.5px; }
.how a { color: #c0396f; font-weight: 600; font-size: 14px; }

/* ── toasts / spinner ── */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); }
.toast { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: #23181f; color: #fff; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); animation: toast-in .35s cubic-bezier(.2,.8,.2,1); transition: opacity .5s, transform .5s; }
.toast--ok { background: linear-gradient(120deg, #1f8f55, #18864b); }
.toast--error { background: linear-gradient(120deg, #c22a4b, #a01f3d); }
.toast a { color: #fff; font-weight: 700; text-decoration: underline; }
.toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--ghost .spinner { border-color: rgba(35,24,31,.2); border-top-color: var(--ink); }

.footer--app { padding-top: 0; }
.footer--app .footer__fine { border-top: 1px solid var(--line); }
.footer__fine a { color: inherit; text-decoration: underline; }

@media (max-width: 960px) {
  .app-body .nav__links { display: flex; margin-left: auto; margin-right: 0; }
  .app-body .nav .btn--sm { display: inline-flex; }
  .app-body .nav__burger { display: none; }
  .launch, .coin-grid2 { grid-template-columns: 1fr; }
  .launch__preview { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .app-body .nav__links { display: none; }
  .app-body .nav .btn--sm { margin-left: auto; }
  .app-head { align-items: stretch; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; }
  .row2 { grid-template-columns: 1fr; }
  .launch__form { padding: 22px; }
  .stat b { font-size: 18px; }
  .coin-head { gap: 14px; }
  .trade-row { grid-template-columns: 48px 1fr 1fr; }
  .trade-row span:nth-child(4), .trade-row span:nth-child(5) { display: none; }
}
