/* Swap page — layout states and the markup rendered by app.js */
.swap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--bg); font-weight: 800; font-size: 14px; }
#mode-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; }

body[data-stage="quote"] #quote-form { display: none; }
body[data-stage="form"] #quote-panel { display: none; }
#quote-panel { animation: fadein .35s ease both; }

.feebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border-radius: 999px; padding: 8px 8px 8px 16px; margin-bottom: 16px; font-weight: 700; font-size: 14px; }
.ptoggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 800; }
.ptoggle span { display: inline-flex; align-items: center; gap: 6px; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }
.privbox { background: var(--bg); border: 1px dashed var(--gray-2); border-radius: 18px; padding: 14px 16px; margin: -4px 0 16px; animation: fadein .35s ease both; }
.privbox ul { margin: 8px 0; padding-left: 18px; color: var(--ink-2); font-weight: 600; font-size: 14px; line-height: 1.7; }
.privbox small { color: var(--gray); font-weight: 700; }

.box { background: var(--bg); border-radius: 22px; padding: 16px 18px; transition: box-shadow .15s, background .15s; }
.box:focus-within { background: var(--white); box-shadow: 0 0 0 2px var(--green); }
.box > label { font-size: 13px; font-weight: 800; color: var(--gray); }
.box .row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.box .row > input[type=text] { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 34px; font-weight: 800; letter-spacing: -.04em; padding: 0; color: var(--ink); }
.box .out { flex: 1; min-width: 0; font-size: 34px; font-weight: 800; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box .foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--gray); min-height: 18px; }
.flipwrap { display: flex; justify-content: center; margin: -14px 0; position: relative; z-index: 2; }
.flip { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--white); border: 4px solid var(--white); display: grid; place-items: center; font-size: 18px; transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.flip:hover { transform: rotate(180deg); }
.est-note { font-size: 13px; font-weight: 700; color: var(--gray); margin: 12px 4px 14px; min-height: 4px; }
.adv summary { cursor: pointer; font-weight: 800; color: var(--green-d); font-size: 14px; margin: 4px 4px 12px; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv[open] summary { margin-bottom: 8px; }
.pill-opt.selected { background: var(--green-soft); border-color: var(--green); }
.route-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.route-tools .chips button { padding: 6px 12px; border-radius: 999px; background: var(--bg); font-weight: 700; font-size: 13px; }
.hint.bad:empty { display: none; }
.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13px; }

/* asset picker generated by app.js */
.asset-picker { position: relative; flex: none; }
.asset-picker-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--white); border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 800; max-width: 190px; }
.asset-picker-current { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.asset-picker-current span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; min-width: 0; }
.asset-picker-current strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-picker-current small { font-size: 11px; color: var(--gray); font-weight: 700; }
.asset-picker-caret::after { content: "▾"; color: var(--gray); font-size: 12px; }
.asset-logo { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.asset-fallback { display: grid; place-items: center; background: var(--line); font-weight: 800; font-size: 13px; }
.asset-picker-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 300px; max-width: 86vw; background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 10px; z-index: 30; }
.asset-picker.open .asset-picker-panel { display: block; animation: fadein .2s ease both; }
.asset-search { width: 100%; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--bg); font-weight: 600; outline: none; color: var(--ink); }
.asset-choice-list { max-height: 320px; overflow-y: auto; margin-top: 8px; display: grid; gap: 2px; }
.asset-choice { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-align: left; }
.asset-choice:hover, .asset-choice.selected { background: var(--bg); }
.asset-choice[hidden] { display: none; }
.asset-choice span { display: flex; flex-direction: column; line-height: 1.15; }
.asset-choice small { color: var(--gray); font-weight: 700; font-size: 12px; }

/* side column */
.tips .item { align-items: flex-start; }
.tips .ic { font-size: 20px; }
.ticker { margin-top: 6px; }
.tick { padding: 8px 4px; }
.tick .asset-logo { width: 30px; height: 30px; }
.chg { font-weight: 800; font-size: 13px; }
.chg.up { color: var(--green-d); }
.chg.down { color: var(--red); }
.local .item { padding: 10px 6px; }
.local .ic .asset-logo { width: 26px; height: 26px; }

/* quote states */
.q-loading { text-align: center; padding: 48px 24px; }
.q-loading b { font-size: 22px; font-variant-numeric: tabular-nums; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--bg); border-top-color: var(--green); margin: 0 auto 18px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.countdown { font-weight: 700; font-variant-numeric: tabular-nums; }
.expiry { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; margin: 12px 0 18px; }
.expiry span { display: block; height: 100%; background: var(--green); border-radius: 6px; transition: width 1s linear; }
.deposit-top { display: flex; gap: 22px; align-items: center; }
.deposit-top .big { font-size: 34px; font-weight: 800; letter-spacing: -.04em; word-break: break-all; }
.qr { width: 184px; height: 184px; border-radius: 18px; background: #fff; padding: 10px; border: 1px solid var(--line); flex: none; }
.qr img { width: 100%; height: 100%; display: block; }
.warn { display: flex; gap: 10px; background: var(--amber-soft); color: #7a4d00; border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 14px; margin: 16px 0; }
.q-lines { margin-top: 8px; }
.q-lines .line > span:last-child, .q-lines .line > a { text-align: right; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.q-actions .btn { flex: 1 1 auto; }
.done-hero { text-align: center; padding: 16px 0 8px; }
.done-hero .check { width: 88px; height: 88px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-size: 42px; margin: 0 auto 14px; color: #0b0b0c; animation: pop .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.rate-us { text-align: center; margin-top: 20px; }
.rate-us div { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.rate-us button { font-size: 26px; width: 54px; height: 54px; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.rate-us button:hover { transform: scale(1.12); }
.tips-list { color: var(--gray); font-weight: 600; line-height: 1.8; padding-left: 18px; }
.timeline li.failed .dotc { background: var(--red); color: #fff; }

/* refund assistant rendered by app.js */
.refund-assistant { background: var(--bg); border-radius: 20px; padding: 16px 18px; margin-top: 14px; }
.refund-assistant .panel-head h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.02em; }
.refund-assistant .panel-head span { color: var(--gray); font-weight: 600; font-size: 14px; }
.refund-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.refund-grid div { background: var(--white); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.refund-grid span { display: block; color: var(--gray); font-size: 12px; font-weight: 700; }
.refund-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.refund-assistant .fineprint { color: var(--gray); font-size: 13px; font-weight: 600; }
.refund-assistant .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.refund-assistant .actions button { padding: 9px 14px; border-radius: 999px; background: var(--white); font-weight: 800; font-size: 13px; }

@media (max-width: 600px) {
  .deposit-top { flex-direction: column; align-items: stretch; }
  .qr { margin: 0 auto; }
  .box .row > input[type=text], .box .out { font-size: 28px; }
  .refund-grid { grid-template-columns: 1fr; }
  .asset-picker-trigger { max-width: 150px; }
}
body.private .warn { color: #ffcf7a; }
body.private .asset-picker-trigger, body.private .refund-grid div, body.private .refund-assistant .actions button { background: #22242a; }
.status-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.status-card div { background: var(--white); border-radius: 14px; padding: 10px 12px; }
.status-card span { display: block; color: var(--gray); font-size: 12px; font-weight: 700; }
@media (max-width: 600px) { .status-card { grid-template-columns: 1fr; } }
