/* The sheet is the surface; use dividers for detail, rather than nested cards. */
dialog#modal {
  --sheet-line:#ffffff1c; --sheet-muted:#b7b4be; --sheet-ink:#f7f6f8;
  box-sizing:border-box; width:min(450px,calc(100vw - 28px)); max-height:min(86dvh,820px);
  margin:auto; padding:28px; border:1px solid #4a464e; border-radius:24px;
  background:linear-gradient(165deg,#29282d 0%,#1c1b20 30%,#151519 90%); color:var(--sheet-ink);
  overflow:auto; overscroll-behavior:contain; box-shadow:0 24px 88px #0009,inset 0 1px #ffffff10;
}
dialog#modal::backdrop {background:#060508b8;backdrop-filter:blur(5px)}
#modal .close {width:44px;height:44px;top:8px;right:8px;border:0;background:radial-gradient(circle,#39373e 0 48%,transparent 50%);border-radius:50%;color:#e7e5eb}
#modal .eyebrow {color:#c1b9c8;font-size:11px;letter-spacing:.13em;font-weight:600;padding-right:28px}
#modal h2 {margin:8px 34px 14px 0;font-size:clamp(24px,5vw,30px);line-height:1.12;letter-spacing:-.04em;font-weight:550;overflow-wrap:anywhere}
#modal p {line-height:1.5;overflow-wrap:anywhere}
#modal :is(.transfer-subtitle,.muted,#request-copy,#prediction-dates,#prediction-confirm-copy,.social-content>p) {font-size:14px;color:var(--sheet-muted)}
#modal label {display:block;font-size:13px;font-weight:550;color:#d3cfd7;margin:16px 0 7px}
#modal :is(input,select) {box-sizing:border-box;width:100%;min-height:48px;border:1px solid #55505b;border-radius:12px;background:#161519;color:var(--sheet-ink);font:inherit;font-size:16px;padding:10px 13px}
#modal :is(input,select,button,a):focus-visible {outline:2px solid #d9baff;outline-offset:2px}
#modal :is(#amount,#payment-amount,#prediction-stake) {min-height:62px;font-size:28px;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
#modal .transfer-meta {font-size:12px;color:var(--sheet-muted)}
#modal .primary {min-height:46px;border-radius:14px;font-size:15px;font-weight:600}
#modal :is(.quote,#request-status) {border:1px solid var(--sheet-line);border-radius:14px;background:#ffffff05;padding:15px;color:#e8e4eb;line-height:1.55;font-size:14px}
#modal .error:empty {display:none}
#modal .error:not(:empty) {color:#ffc2c8;font-size:14px}
#modal .relay-dialog .relay-symbol {width:56px;height:56px;margin:0 0 16px;display:grid;place-items:center;border:1px solid #c694ff4a;border-radius:18px;background:radial-gradient(circle at top,#ae75f541,transparent)}
#modal .relay-dialog ul {gap:0;margin:18px 0;border-top:1px solid var(--sheet-line)}
#modal .relay-dialog li {border:0;border-bottom:1px solid var(--sheet-line);border-radius:0;background:none;padding:10px 0;font-size:14px;color:#e0d4eb}
#modal .relay-dialog li::before {content:'';display:inline-block;width:5px;height:5px;margin-right:11px;background:#c6a2ee;transform:rotate(45deg);vertical-align:middle}
#modal .relay-dialog small {display:block;color:var(--sheet-muted);font-size:12px;line-height:1.5;margin-top:16px}
#modal .membership-warning {font-size:13px;line-height:1.45}
#modal .profile-head {padding-bottom:17px;border-bottom:1px solid var(--sheet-line)}
#modal .profile-head h2 {font-size:23px;margin:0 34px 5px 0}
#modal .profile-tier,#modal .profile-balance small,#modal .profile-summary small {font-size:12px;color:var(--sheet-muted)}
#modal .profile-sheet.is-obsidian {background:radial-gradient(ellipse at 0 0,#b788e719,transparent 55%)}
#modal .profile-balance {padding:20px 0}
#modal .profile-balance strong {font-variant-numeric:tabular-nums;font-size:34px}
#modal .profile-summary b {font-size:15px}
#modal .profile-actions {gap:6px;margin-bottom:16px}
#modal .profile-actions button {min-height:44px;font-size:13px}
#modal .profile-mini-event {padding:12px 0;font-variant-numeric:tabular-nums}
#modal .market-info-line {align-items:baseline;border-color:var(--sheet-line);font-size:14px;font-variant-numeric:tabular-nums}
#modal .market-info-line span {color:var(--sheet-muted)}
#modal .market-info-head {color:#e4c8ff;font-size:15px;font-weight:550}
#modal .inbox-list h3,#modal .profile-recent h3 {color:#d9d3de;font-size:14px;font-weight:550}
#modal .inbox-item .inbox-item-detail small {font-size:11px}
#modal .inbox-item .inbox-item-detail b {font-size:15px}
#modal .contact-row {gap:6px;padding-block:12px}
#modal .contact-row .person-link {min-width:0}
#modal .contact-row .small-action {min-height:44px;padding-inline:11px;border-radius:12px}
@media(max-width:600px){
  dialog#modal {width:100%;max-width:100%;max-height:90dvh;margin:auto 0 0;border-radius:24px 24px 0 0;border-bottom:0;padding:23px clamp(16px,5vw,24px) calc(22px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:no-preference){
  dialog#modal[open] {animation:sheet-arrive .18s ease-out}
  @keyframes sheet-arrive {from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
}
