/* Stillsize — desk app */
body.desk { background: radial-gradient(80% 50% at 50% -10%, rgba(110,242,196,.06), transparent 60%), var(--bg); min-height: 100vh; }

.dbar { position: sticky; top: 0; z-index: 40; background: rgba(6,8,12,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.dbar-inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.dtabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-left: 12px; }
.dtabs button { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; transition: all .2s; }
.dtabs button:hover { color: var(--text); }
.dtabs button.on { background: rgba(255,255,255,.08); color: var(--text); }
.count { font-family: var(--mono); font-size: 11px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; }
.count:empty, .count[data-zero] { display: none; }
.dbar-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.net { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
#walletBtn.connected { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; }
#walletBtn.connected::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 90deg, #6ef2c4, #6aa8ff, #c08bff, #6ef2c4); }

.demo-banner { max-width: 1320px; margin: 16px auto 0; padding: 0 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }

.dmain { max-width: 1320px; padding-top: 28px; padding-bottom: 80px; }
.tab { display: none; animation: fadeUp .35s var(--ease); }
.tab.on { display: block; }
.dhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.dhead h1 { margin: 0; font-size: 32px; letter-spacing: -0.035em; font-weight: 650; }
.dhead p { margin: 6px 0 0; }
.dsum { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.dsum > div { padding: 12px 20px; display: grid; gap: 2px; border-right: 1px solid var(--line); }
.dsum > div:last-child { border-right: 0; }
.dsum span { font-size: 12px; }
.dsum b { font-size: 18px; font-weight: 500; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search .input { padding-left: 40px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); gap: 2px; }
.seg button { height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; color: var(--muted); transition: all .2s; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.big { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.big button { height: 44px; font-weight: 600; }
.seg.big button.on[data-v=ask] { background: rgba(255,122,122,.1); color: #ffb3b3; box-shadow: inset 0 0 0 1px rgba(255,122,122,.3); }
.seg.big button.on[data-v=bid] { background: rgba(110,242,196,.1); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(110,242,196,.3); }

/* table */
.table-wrap { overflow-x: auto; }
.otable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
.otable th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.otable td { padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.otable tbody tr { transition: background .15s; }
.otable tbody tr:hover { background: rgba(255,255,255,.02); }
.otable tbody tr:last-child td { border-bottom: 0; }
.otable .r { text-align: right; }
.tok { display: flex; align-items: center; gap: 12px; }
.tok-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; flex: none; }
.tok b { display: block; font-weight: 600; }
.tok small { color: var(--dim); font-size: 12px; }
.side-pill { display: inline-flex; height: 24px; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.side-pill.ask { background: rgba(255,122,122,.1); color: #ffb3b3; }
.side-pill.bid { background: rgba(110,242,196,.1); color: var(--accent); }
.terms { display: flex; gap: 6px; }
.term { font-family: var(--mono); font-size: 10.5px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.term.priv { border-color: rgba(192,139,255,.35); color: #d7b8ff; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.mine-tag { font-size: 10.5px; font-family: var(--mono); color: var(--accent); margin-left: 6px; }

/* post */
.post-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.pform { padding: 26px; display: grid; gap: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { float: right; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.inwrap { position: relative; }
.inwrap .input { padding-right: 70px; }
.max { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 10px; border-radius: 8px; font-family: var(--mono); font-size: 11px; color: var(--accent); background: rgba(110,242,196,.08); }
.max:hover { background: rgba(110,242,196,.16); }
.premium { display: grid; grid-template-columns: auto 1fr 64px; align-items: center; gap: 14px; font-size: 13px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.premium input[type=range] { background: linear-gradient(90deg, var(--line-2) 0 100%); }
.premium .mono { text-align: right; }
.toggles { display: grid; gap: 10px; }
.tg { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; }
.tg:hover { border-color: var(--line-2); }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg .sw { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.tg .sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .25s var(--ease); }
.tg input:checked + .sw { background: var(--accent); }
.tg input:checked + .sw::after { transform: translateX(16px); background: var(--accent-ink); }
.tg input:focus-visible + .sw { box-shadow: 0 0 0 3px var(--accent-glow); }
.tg b { display: block; font-weight: 600; font-size: 14.5px; }
.tg small { color: var(--muted); font-size: 13px; }
.sub-opt { padding-left: 16px; border-left: 2px solid var(--line-2); margin-left: 18px; }
.select:disabled { opacity: .45; cursor: not-allowed; }
.form-err { padding: 12px 14px; border-radius: 10px; background: rgba(255,122,122,.08); border: 1px solid rgba(255,122,122,.25); color: #ffb3b3; font-size: 14px; }

.pside { display: grid; gap: 16px; position: sticky; top: 90px; }
.preview, .sigbox { padding: 24px; }
.pv-note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(110,242,196,.06); border: 1px solid rgba(110,242,196,.18); font-size: 13.5px; color: var(--muted); }
.pv-note:empty { display: none; }
.pv-note.warn { background: rgba(255,197,110,.06); border-color: rgba(255,197,110,.25); }
.sigbox pre { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; }
.sigbox pre .k { color: #9ec7ff; } .sigbox pre .s { color: var(--accent); }

/* mine + receipts */
.mine-list, .rc-list { display: grid; gap: 12px; }
.mine-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 16px; align-items: center; padding: 18px 22px; }
.mine-row .lbl { font-size: 12px; color: var(--dim); display: block; }
.prog { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin-top: 6px; width: 120px; }
.prog i { display: block; height: 100%; background: var(--accent); }
.st { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.rc-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.rc { padding: 24px; overflow: hidden; }
.rc::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #6aa8ff); }
.rc .big { font-family: var(--mono); font-size: 30px; margin: 10px 0 14px; letter-spacing: -0.02em; }
.rc .saved-row { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(110,242,196,.07); font-size: 13.5px; }
.rc .saved-row b { font-family: var(--mono); color: var(--accent); font-size: 17px; }
.rc .tx { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); word-break: break-all; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-bg { position: absolute; inset: 0; background: rgba(3,5,8,.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.modal.open .modal-bg { opacity: 1; }
.modal-card { position: relative; width: 100%; max-width: 480px; padding: 26px; max-height: calc(100vh - 40px); overflow: auto; transform: translateY(16px) scale(.98); opacity: 0; transition: all .3s var(--ease); background: var(--surface); }
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-x { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.modal-x:hover { background: rgba(255,255,255,.06); color: var(--text); }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
.modal .btn { width: 100%; justify-content: center; margin-top: 18px; }
.wallets { display: grid; gap: 8px; margin-top: 18px; }
.wallet-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); text-align: left; transition: all .2s; }
.wallet-opt:hover { border-color: rgba(110,242,196,.4); background: rgba(110,242,196,.04); }
.wallet-opt i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; }
.progress-steps { margin-top: 18px; display: grid; gap: 8px; }
.pstep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.02); font-size: 14px; color: var(--dim); }
.pstep .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.pstep.run { color: var(--text); }
.pstep.run .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.pstep.ok { color: var(--text); }
.pstep.ok .dot { background: var(--accent); border-color: var(--accent); }
.pstep.ok .dot::after { content: '✓'; color: var(--accent-ink); font-size: 11px; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
.slider-row { margin-top: 16px; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }

@media (max-width: 1000px) {
  .dbar-inner { flex-wrap: wrap; }
  .dtabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .net { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .pside { position: static; }
  .mine-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; }
  .dsum { width: 100%; }
  .dsum > div { flex: 1; padding: 10px 12px; }
  .dsum b { font-size: 15px; }
}
