:root {
  color-scheme: light;
  --ink: #17241f;
  --muted: #75847d;
  --line: #dde7e1;
  --green: #0c815e;
  --green-dark: #0c2e25;
  --soft: #eaf6f0;
  --canvas: #e7efe9;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
.preview-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 390px) 360px; gap: 70px; justify-content: center; align-items: center; padding: 45px 25px; }
.phone { height: min(820px, calc(100vh - 60px)); min-height: 620px; overflow: hidden; border: 9px solid var(--green-dark); border-radius: 29px; background: #f7faf8; box-shadow: 0 28px 60px rgba(16, 45, 34, .2); }
.phone-head { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: #fff; border-bottom: 1px solid var(--line); }
.phone-head strong, .phone-head span { display: block; }
.phone-head strong { font-size: 13px; }
.phone-head span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.bot-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: #fff; font-weight: 800; }
.small-icon { margin-left: auto; border: 0; background: transparent; font-size: 22px; color: var(--muted); }
.bot-content { height: calc(100% - 72px); overflow: auto; padding: 17px; }
.balance-card { padding: 17px; color: #fff; background: var(--green-dark); border-radius: 14px; }
.balance-label { color: #a6d3bf; font-size: 11px; font-weight: 700; }
.balance-value { margin-top: 7px; font-size: 28px; font-weight: 800; }
.balance-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-top: 15px; color: #b7d6c8; font-size: 11px; }
.market-search { margin-top: 16px; }
.market-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.market-search-row input { min-width: 0; border: 0; padding: 0 12px; color: var(--ink); background: transparent; font: inherit; font-size: 12px; outline: none; }
.market-search-row input:focus { box-shadow: inset 0 0 0 2px rgba(12, 129, 94, .22); }
.market-search-button, .market-search-clear { border: 0; color: #fff; background: var(--green); font-size: 12px; font-weight: 800; }
.market-search-button { min-width: 58px; padding: 0 13px; }
.market-search-clear { width: 38px; color: var(--muted); background: #fff; font-size: 22px; }
.search-results-head { margin-top: 16px; }
.search-empty { padding: 18px 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 22px 0 10px; }
.section-head h2 { margin: 0; font-size: 15px; }
.section-head span { color: var(--muted); font-size: 11px; }
.event-card { padding: 15px; margin-bottom: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.event-card h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.event-card p { margin: 8px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.event-card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.event-original, .market-original { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.heat { color: #b86511; font-weight: 800; }
.market-row { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.market-question { font-size: 12px; font-weight: 750; line-height: 1.4; }
.market-meta { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.market-prices { display: flex; gap: 8px; margin-top: 9px; }
.market-button, .action-button { flex: 1; border: 0; border-radius: 7px; padding: 10px 7px; font-size: 12px; font-weight: 800; }
.market-button.yes { color: #0b7656; background: var(--soft); }
.market-button.no { color: #a74942; background: #fdebea; }
.market-button.readonly { display: block; text-align: center; cursor: default; }
.load-more { width: 100%; min-height: 42px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); background: #fff; font-weight: 800; }
.action-button { width: 100%; margin-top: 9px; color: #fff; background: var(--green); }
.action-button.secondary { color: var(--green-dark); background: #d9ebe1; }
.inline-action { margin-top: 8px; border: 1px solid #b9d8ca; border-radius: 6px; padding: 6px 9px; color: var(--green-dark); background: #fff; font-size: 11px; font-weight: 800; }
.deposit-card { margin-top: 14px; padding: 14px; border: 1px solid #cce7d9; border-radius: 11px; background: var(--soft); }
.deposit-card p { margin: 0 0 7px; font-size: 12px; }
.deposit-card.success { border-color: #93d8b9; background: #e2f6ea; }
.deposit-card.danger { border-color: #f0c4bf; background: #fff0ee; }
.deposit-status { margin-top: 9px; color: var(--green-dark); font-size: 11px; font-weight: 700; }
.address { display: block; overflow-wrap: anywhere; color: var(--green-dark); font-size: 10px; line-height: 1.45; }
.qr-code { display: block; width: 142px; height: 142px; margin: 9px auto 10px; padding: 8px; border: 1px solid #b9d8ca; border-radius: 7px; background: #fff; image-rendering: pixelated; }
.position-row { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.position-row:last-child { border-bottom: 0; }
.position-detail { display: block; }
.position-heading { display: grid; gap: 3px; line-height: 1.35; }
.position-heading span { color: var(--muted); }
.position-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.position-metrics span { min-width: 0; font-weight: 750; }
.position-metrics small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }
.settlement-row { display: flex; justify-content: space-between; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.settlement-row:last-child { border-bottom: 0; }
.muted { color: var(--muted); }
.empty { padding: 30px 0; color: var(--muted); text-align: center; font-size: 12px; }
.preview-notes { max-width: 340px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.preview-notes h1 { margin: 0; font-size: 34px; line-height: 1.08; }
.preview-notes p { color: var(--muted); line-height: 1.65; }
.preview-notes label { display: grid; gap: 7px; margin: 24px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.preview-notes input { border: 1px solid var(--line); border-radius: 7px; padding: 11px; background: #fff; }
.preview-notes a { color: var(--green); font-weight: 800; }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 15px; border-radius: 7px; color: #fff; background: var(--green-dark); opacity: 0; transform: translateY(8px); transition: .16s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 800px) {
  .preview-shell { grid-template-columns: 1fr; gap: 25px; }
  .phone { width: min(390px, 100%); margin: 0 auto; }
  .preview-notes { max-width: 390px; margin: 0 auto; }
}
