/* Orvane app — "market" design system. Tokens and components come from the approved landing mock-up. */
:root {
  --bg: #FBF8F2; --card: #F3EEE3; --card-2: #EDE6D8; --line: #E4DCCB; --line-2: #D8CEB9;
  --ink: #1C1A17; --ink-2: #5D574D; --ink-3: #7A7367; --white: #fff;
  --up: #2E8B3E; --down: #C2413A; --cobalt: #2B54FF; --amber: #9A6A12; --mint: #7ee08f;
  --r: 18px; --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 8px 24px rgba(60, 40, 10, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 16px/1.5 var(--font-sans), Outfit, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(32px, 4vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.04; }
h2 { font-size: 23px; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--ink); color: #fff; }

.wrap { width: min(100% - 32px, 1188px); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.wrapx { flex-wrap: wrap; }

/* ---------- top of the page: logo on the left, round menu button on the right ---------- */
.wrap.narrow { width: min(100% - 40px, 680px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 4px; position: relative; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.account { position: relative; }
.account summary { list-style: none; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; letter-spacing: .02em; cursor: pointer; transition: transform .2s var(--ease); }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { transform: scale(1.05); }
.account[open] summary { box-shadow: 0 0 0 4px var(--card-2); }
.menu { position: absolute; right: 0; top: 56px; width: 270px; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 8px; box-shadow: 0 24px 60px rgba(40, 25, 5, .18); animation: pop .22s var(--ease) both; }
.menu .who { display: block; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 0; background: none; font-size: 15.5px; font-weight: 500; text-align: left; }
.menu a:hover, .menu button:hover, .menu a.on { background: var(--card); }
.menu button { color: var(--ink-2); margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }

.page { padding: 14px 0 72px; animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .2s var(--ease), background .2s, opacity .2s; }
.btn:hover { background: #000; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; transform: none; }
.btn-primary, .btn-lime { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--card); }
.btn-danger { background: var(--white); color: var(--down); border: 1px solid #e6c4c0; }
.btn-danger:hover { background: #fbeeec; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-pill { background: var(--card); color: var(--ink); font-weight: 500; height: 38px; padding: 0 16px; }
.btn-pill:hover { background: var(--card-2); }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card.lift { transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.card.lift:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 30px rgba(60, 40, 10, .08); }
.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.dark .label, .dark .faint { color: #a8a195; }
.dark .muted { color: #cfc8ba; }
.dark .up { color: var(--mint); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px 14px 18px; margin-bottom: 20px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); display: inline-block; flex: none; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); }
.sect { display: flex; align-items: end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 56px 0 18px; }
.sect:first-child { margin-top: 0; }

/* page head: giant figure, rule, side content (the mock-up's banner) */
.banner { position: relative; display: grid; grid-template-columns: auto 1px minmax(0, 1fr); align-items: center; gap: 44px; padding: 26px 0 34px; border-bottom: 1px solid var(--line); }
.banner .vr { width: 1px; height: 130px; background: var(--line-2); }
.stat { font-weight: 400; font-size: clamp(52px, 9vw, 76px); letter-spacing: -.035em; line-height: 1; margin-top: 6px; }
.stat small { font-size: .5em; font-weight: 400; letter-spacing: -.02em; }
.stat span { font-size: .4em; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-left: 10px; }
.cap { font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; letter-spacing: -.02em; margin-top: 10px; }
.cap span { color: var(--ink-3); font-weight: 500; }
.glow { position: absolute; right: -40px; top: -30px; width: 420px; height: 300px; background: radial-gradient(closest-side, rgba(214, 196, 160, .5), transparent); filter: blur(10px); pointer-events: none; z-index: -1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.split a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .2s, transform .2s var(--ease); }
.split a:hover { border-color: var(--ink); transform: translateY(-1px); }
.split b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }

/* ---------- coin icon, pills, bars ---------- */
.ico { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -.02em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ico.sm { width: 40px; height: 40px; border-radius: 10px; font-size: 16px; }
.ico.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.ico.BTC { background: #F7931A; } .ico.ETH { background: #627EEA; } .ico.USDC { background: #2775CA; } .ico.USDT { background: #26A17B; } .ico.POOL { background: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--white); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.green { color: var(--up); border-color: #cfe5d2; background: #f1f9f2; }
.pill.blue { color: #1f3fc4; border-color: #d3dbff; background: #f2f5ff; }
.pill.amber { color: var(--amber); border-color: #ecdcb8; background: #fdf7e8; }
.pill.red { color: var(--down); border-color: #efcfcb; background: #fdf1ef; }
.bar { position: relative; height: 8px; background: var(--card-2); border-radius: 9px; overflow: hidden; }
.bar i { display: block; width: 100%; height: 100%; background: var(--ink); border-radius: 9px; transition: transform 1s var(--ease); }
.dark .bar { background: rgba(255, 255, 255, .14); } .dark .bar i { background: #fff; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--card-2), var(--card), var(--card-2)); background-size: 200% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- pool card ---------- */
.pool { display: flex; flex-direction: column; gap: 16px; }
.pool .rate { font-size: clamp(52px, 6vw, 76px); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.pool .rate em { font-style: normal; color: var(--up); }
.pool .rate small { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-3); margin-left: 8px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.facts b { display: block; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }

/* ---------- table of rows ---------- */
.table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.trow { display: grid; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); transition: background .2s; }
.trow:first-child { border-top: 0; }
.trow.h { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.trow:not(.h):hover { background: var(--card-2); }
.who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.who b { font-weight: 700; }
.who .sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.val { font-weight: 600; }
.cols-coins { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr 1fr; }
.cols-wallet { grid-template-columns: minmax(0, 1.5fr) 1fr 1fr auto; }
.cols-act { grid-template-columns: minmax(0, 1.6fr) 1fr auto; }
.cols-stake { grid-template-columns: minmax(0, 1.4fr) 1fr 170px 110px; }
.cols-stake .renew { justify-self: end; }
.calc { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.list .item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }

/* classic table (admin) */
.scroll-x { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 10px 12px; white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }

/* ---------- controls ---------- */
.tabs, .seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.card .seg, .modal .seg, .card .tabs { background: #fff; }
.tabs button, .seg button { border: 0; background: none; padding: 7px 13px; border-radius: 9px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; text-transform: none; }
.tabs button:hover, .seg button:hover { color: var(--ink); }
.tabs button.on, .seg button.on, .seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label, .field > span > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; padding: 0 14px; font: inherit; color: var(--ink); }
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.input.amount { height: 60px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.input::placeholder { color: #b6ae9f; }
input[type=range] { width: 100%; accent-color: var(--ink); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 2px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 99px; border: 0; background: var(--line-2); transition: background .2s; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.addr { font-size: 14px; word-break: break-all; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px; font-variant-numeric: tabular-nums; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.quote .big { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.error { color: var(--down); font-size: 14px; min-height: 20px; }
.error:empty { min-height: 0; }
.ok-msg { color: var(--up); font-weight: 600; }

/* ---------- modal + toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(28, 26, 23, .35); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .2s both; }
.modal { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg); border-radius: 22px; padding: 26px; box-shadow: 0 40px 100px rgba(40, 25, 5, .25); animation: pop .3s var(--ease) both; }
.modal h2 { font-size: 26px; letter-spacing: -.03em; }
.x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 18px; line-height: 1; flex: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: 0 16px 40px rgba(40, 25, 5, .3); animation: pop .3s var(--ease) both; max-width: calc(100vw - 32px); }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side { background: var(--ink); color: #fff; padding: 36px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 460px; height: 460px; background: radial-gradient(closest-side, rgba(214, 196, 160, .22), transparent); pointer-events: none; }
.auth-side h2 { font-size: clamp(48px, 6.2vw, 88px); font-weight: 800; letter-spacing: -.05em; line-height: .92; }
.auth-side h2 em { font-style: normal; color: var(--mint); }
.marks { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 30px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.mark small { display: block; font-weight: 500; font-size: 11.5px; color: #a8a195; letter-spacing: .02em; text-transform: uppercase; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-form h1 { font-size: 40px; }
.steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.steps li { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink-3); }
.steps li.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pw { position: relative; }
.pw button { position: absolute; right: 8px; top: 8px; height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--card); font-size: 13px; font-weight: 600; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.meter div { display: flex; gap: 4px; flex: 1; }
.meter i { height: 4px; flex: 1; border-radius: 4px; background: var(--line-2); }
.meter i.on { background: var(--ink); }

/* ---------- shared layout pieces ---------- */
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.show-sm { display: none; }
.when { display: block; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* two figures beside the page's headline number */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.pair > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.pair b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

/* a coin row's name opens that coin's sheet */
.rowbtn { display: block; max-width: 100%; background: none; border: 0; padding: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowbtn:hover b { text-decoration: underline; text-underline-offset: 3px; }
.coin-figure { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; overflow-wrap: anywhere; }
.coin-figure span { font-size: .55em; font-weight: 700; letter-spacing: -.01em; color: var(--ink-3); }

/* pretend money on the demo */
.pretend { padding: 16px; background: #fff; border-style: dashed; border-color: var(--line-2); }
.pretend h3 { margin-bottom: 4px; }
.pretend .chips .btn { flex: 1; }

/* ---------- customer screens: a balance, round buttons, plain rows ---------- */
.hero { padding: 26px 0 4px; }
.hero .label { font-size: 15px; font-weight: 400; color: var(--ink-2); }
.hero .sub { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.hero .sub span { color: var(--line-2); margin: 0 4px; }
.hero .sub b { font-weight: 500; }
.acts { display: flex; gap: clamp(18px, 6vw, 40px); margin-top: 30px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 62px; padding: 0; border: 0; background: none; font-size: 14.5px; font-weight: 500; }
.act i { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); transition: transform .2s var(--ease), background .2s; }
.act.main i { background: var(--ink); color: #fff; }
.act:hover i { transform: translateY(-2px); }
.act:active i { transform: scale(.95); }
.act:disabled { opacity: .4; }
.app .sect { align-items: center; margin: 46px 0 8px; }
.app .ico { border-radius: 50%; }
/* lists sit straight on the page: rows and hairlines, no box around them */
.app .table { background: none; border: 0; border-radius: 0; overflow: visible; }
.app .trow { padding: 15px 0; }
.app .trow:not(.h):hover { background: none; }
.app .who b, .app .val { font-weight: 500; }
.app .who .sub { font-size: 13.5px; }
.app .empty { padding: 28px 0; text-align: left; }
.rows > * + * { border-top: 1px solid var(--line); }
.poolrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 16px; padding: 18px 0; }
.poolrow .round { grid-column: 1 / -1; display: grid; gap: 8px; }
.poolrow h3 { font-weight: 500; }
.earn { display: grid; gap: 12px; padding: 18px 0; }
.earn .tick { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.earn .foot { padding-top: 2px; }
/* one segment a day */
.bar.days { height: 10px; }
.bar.days::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--days) - 2px), var(--bg) calc(100% / var(--days) - 2px) calc(100% / var(--days))); }
.bar.days i { background: var(--up); border-radius: 0; transition: transform 1s linear; }

/* interest has arrived: party poppers from the two top corners */
.party { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.party i { position: absolute; top: -10px; border-radius: 2px; opacity: 0; animation: popper 2s cubic-bezier(.12, .7, .3, 1) both; }
@keyframes popper { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot)); } }
.party .won { position: absolute; top: 20px; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); pointer-events: auto; border: 0; background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 99px; font-size: 15.5px; box-shadow: 0 16px 40px rgba(40, 25, 5, .3); animation: pop .4s var(--ease) both; }
.party .won b { color: var(--mint); font-weight: 600; margin-right: 4px; }

@keyframes sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* A finger does not hover. Without this the last thing tapped stays "lifted" until the next tap. */
@media (hover: none) {
  .btn:hover { background: var(--ink); transform: none; }
  .btn-ghost:hover, .btn-danger:hover { background: var(--white); }
  .card.lift:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .split a:hover { transform: none; border-color: var(--line); }
  .trow:not(.h):hover { background: none; }
  .account summary:hover, .act:hover i { transform: none; }
  .rowbtn:hover b { text-decoration: none; }
  .btn:active { transform: scale(.97); }
  .btn-ghost:active, .trow:not(.h):active, .split a:active { background: var(--card-2); }
}

/* Finger-sized controls on phones and on any touch screen. */
@media (pointer: coarse), (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  .btn { height: 46px; }
  .btn-lg { height: 54px; }
  .btn-sm { height: 40px; padding: 0 16px; }
  .tabs button, .seg button { min-height: 42px; padding-inline: 14px; }
  .x { width: 42px; height: 42px; }
  .pw button { height: 34px; top: 8px; padding: 0 12px; }
  /* small text links get a taller tap area without moving anything around them */
  .linkish, .sect > a.small { padding-block: 11px; margin-block: -11px; }
  .switch { width: 46px; height: 28px; }
  .switch::after { width: 22px; height: 22px; }
  .switch[aria-checked="true"]::after { transform: translateX(18px); }
  input[type=checkbox] { width: 22px; height: 22px; }
  .check { gap: 12px; }
}

@media (max-width: 980px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-coins { grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; }
  .cols-wallet { grid-template-columns: minmax(0, 1.5fr) 1fr auto; }
  .cols-stake { grid-template-columns: minmax(0, 1fr) auto; }
  .cols-stake .renew { justify-self: start; }
  .calc, .side { grid-template-columns: 1fr; }
  .hide-md { display: none !important; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-side { padding: 24px 20px; gap: 22px; }
  .auth-side h2 { font-size: 44px; }
  .auth-side .marks { margin-top: 16px; }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .wrap.narrow { width: calc(100% - 36px); }
  .page { padding: 6px 0 calc(48px + env(safe-area-inset-bottom)); }
  .hero { padding-top: 18px; }
  .acts { justify-content: space-between; gap: 8px; }
  .earn > .between:last-of-type { flex-direction: column; align-items: flex-start; gap: 2px; }
  .poolrow .round .between { flex-direction: column; align-items: flex-start; gap: 2px; }
  .banner { grid-template-columns: 1fr; gap: 20px; padding: 10px 0 24px; }
  .banner .vr, .glow { display: none; }
  /* the headline figure shrinks just enough to keep a long balance on one line */
  .stat { font-size: min(60px, calc((100vw - 36px) / (var(--len, 8) * .5))); }
  .g2, .g3 { grid-template-columns: 1fr; }
  .sect { margin-top: 40px; }
  .card { padding: 18px; }
  .trow { padding: 12px 14px; position: relative; }
  .cols-coins, .cols-wallet, .cols-act { grid-template-columns: minmax(0, 1fr) auto; }
  .rowbtn::after { content: ""; position: absolute; inset: 0; }
  .facts { gap: 6px; }
  .facts div { padding: 9px 10px; }
  .facts b { font-size: 14px; }
  .split b { font-size: clamp(15px, 4.7vw, 20px); overflow-wrap: anywhere; }
  .split a { padding: 13px 14px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none !important; }
  .show-sm { display: block; }
  .actions .btn { flex: 1; }

  /* the two side figures become one compact card: name on the left, figure on the right */
  .pair { grid-template-columns: 1fr; gap: 0; max-width: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
  .pair > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; background: none; border: 0; border-radius: 0; padding: 14px 16px; }
  .pair > div + div { border-top: 1px solid var(--line); }
  .pair .label, .pair .small { grid-column: 1; }
  .pair b { grid-column: 2; grid-row: 1 / span 2; font-size: 20px; text-align: right; }

  /* forms: 16px text stops iPhones zooming in when a field is tapped */
  .input { height: 50px; font-size: 16px; }
  .input.amount { height: 62px; font-size: 26px; }
  .pw button { height: 40px; top: 5px; right: 5px; }

  /* sheets rise from the bottom edge */
  .backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; animation: sheet .42s cubic-bezier(.16, 1, .3, 1) both; }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 14px; }
  .modal h2 { font-size: 24px; }
  .modal .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .modal .seg button { padding-inline: 4px; }

  .tabs { display: flex; }
  .toast { bottom: calc(20px + env(safe-area-inset-bottom)); width: max-content; text-align: center; }

  /* admin tables keep their columns readable and scroll sideways inside their card */
  .scroll-x { margin-inline: -18px; padding-inline: 18px; }
  .scroll-x .tbl { min-width: 560px; }
  .scroll-x .tbl td:first-child { white-space: nowrap; }
  .cols-stake .who .sub { white-space: normal; }

  .auth-side { padding: 16px 20px 22px; gap: 18px; }
  .auth-side h2 { font-size: 38px; }
  .auth-side .marks { display: none; }
  .auth-main { place-items: start center; padding: 28px 20px 40px; }
  .auth-form h1 { font-size: 34px; }
}
@media (max-width: 380px) {
  .facts b { font-size: 13px; }
  .facts div { padding: 8px; }
  .modal { padding-inline: 16px; }
}
