/* Shared navigation and Explore extend the approved Porcelain workspace. */
html { scrollbar-gutter:stable; }
body[data-refinement="porcelain"] { --page-gutter:clamp(18px,3vw,48px); }
main { width:100%; max-width:none; margin:0; padding:25px var(--page-gutter) 42px; }
.app-header .wallet-button { display:inline-flex; align-items:center; justify-content:center; flex:none; gap:9px; padding:0 14px; border:1px solid transparent; border-radius:10px; background:var(--blue); color:#fff; font-size:12px; font-weight:600; line-height:1; white-space:nowrap; }
.app-header .wallet-button:hover { background:#6342b6; border-color:#6342b6; }
.app-header .wallet-button>span { display:inline-flex; align-items:center; line-height:1; }
.wallet-button-icon { display:block; width:16px; height:16px; flex:none; }
.wallet-button-chevron { flex:none; font-size:14px; line-height:1; opacity:.75; }
.app-header .wallet-button[data-state="connected"],.app-header .wallet-button[data-state="wrong-network"] { border-color:#e5dcf2; background:#fff; color:#51446f; }
.wallet-button-status { width:6px; height:6px; flex:none; border-radius:50%; background:#4b9c78; }
.wallet-button .wallet-button-address { display:block; max-width:132px; overflow:hidden; text-overflow:ellipsis; font-family:ui-monospace,'SFMono-Regular',Menlo,monospace; font-size:11px; font-weight:500; line-height:1; font-variant-numeric:tabular-nums; }
.app-header .wallet-button[data-state="wrong-network"],.network-button[data-state="wrong-network"] { border-color:#ead4a4; background:#fffaf0; color:#79520f; }
.network-button { display:inline-flex; align-items:center; justify-content:center; flex:none; gap:8px; padding:0 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font-size:12px; font-weight:550; line-height:1; white-space:nowrap; }
.network-button .network-icon { display:block; flex:none; width:18px; height:18px; color:#8247e5; }
.network-button #environment-label { font-size:8px; font-weight:600; letter-spacing:.4px; color:var(--muted); }
.network-button[data-state="switching"] { cursor:progress; }
body[data-view="explore"] main { padding-top:19px; }
.workspace-title { min-width:0; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.explore-controls { display:flex; align-items:center; flex:1 1 370px; min-width:180px; }
.explore-search { display:flex; flex:1; min-width:120px; align-items:center; gap:9px; margin:0; padding:9px 12px; background:var(--paper); border-radius:8px; }
.explore-search input { width:100%; font-size:12px; }
.explore-search svg { flex:none; width:16px; height:16px; }
.discovery-navigation { background:#fff; border-bottom:1px solid var(--line); }
.discovery-navigation-inner { width:100%; max-width:none; margin:0; padding:0 var(--page-gutter); }
.discovery-primary { display:flex; gap:16px; align-items:center; }
.discovery-actions { display:flex; flex:none; align-items:center; gap:10px; }
.explore-categories { display:flex; flex:1; min-width:0; align-items:center; gap:4px; flex-wrap:nowrap; min-height:45px; padding:5px 0; overflow-x:auto; scrollbar-width:thin; scrollbar-color:#d7cee6 transparent; }
.explore-category { display:flex; flex:none; align-items:center; gap:6px; border:1px solid transparent; background:transparent; border-radius:6px; padding:6px 10px; font-size:12px; color:var(--muted); white-space:nowrap; }
.explore-category:hover { background:#f0ebf7; color:var(--ink); }
.explore-category.active { background:var(--blue-soft); border-color:transparent; color:var(--blue); font-weight:650; }
.explore-category span { font-size:9px; padding:1px 4px; border-radius:4px; background:#eee8f7; color:#7a658d; font-variant-numeric:tabular-nums; }
#explore-workspace { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; }
#explore-workspace:has(.explore-subcategories:not([hidden])) { grid-template-columns:188px minmax(0,1fr); gap:28px; }
.explore-main { min-width:0; }
.explore-count { margin:0 0 14px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.explore-subcategories { position:sticky; top:18px; min-width:0; padding-right:15px; border-right:1px solid var(--line); }
.subcategory-disclosure>summary { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:7px 10px 13px; cursor:pointer; list-style:none; }
.subcategory-disclosure>summary::-webkit-details-marker { display:none; }
.subcategory-disclosure>summary>svg { width:12px; height:12px; flex:none; color:#9a8ba7; transform:rotate(-90deg); }
.subcategory-disclosure[open]>summary>svg { transform:rotate(0); }
.subcategory-context { font-size:12px; font-weight:650; color:var(--ink); }
.subcategory-list { display:flex; flex-direction:column; gap:3px; min-width:0; max-height:calc(100dvh - 210px); overflow-y:auto; overscroll-behavior:contain; padding:0 3px 8px 0; scrollbar-width:thin; scrollbar-color:#d7cee6 transparent; }
.subcategory-button { flex:none; display:flex; width:100%; align-items:center; justify-content:space-between; gap:9px; padding:8px 10px; font-size:12px; text-align:left; line-height:1.4; border:1px solid transparent; border-radius:6px; color:var(--muted); }
.subcategory-button:hover { color:var(--ink); background:#f6f3fa; }
.subcategory-button.active { color:var(--blue); border-color:transparent; background:var(--blue-soft); font-weight:650; }
.subcategory-button>span { font-size:9px; color:#9b8aab; font-variant-numeric:tabular-nums; }
.subcategory-kind { flex:none; padding:15px 10px 6px; margin-top:8px; font-size:10px; font-weight:600; color:#a398ad; border-top:1px solid var(--line); }
.explore-card-status i { display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--jade); }
.explore-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; align-items:stretch; }
.explore-card { position:relative; display:flex; flex-direction:column; padding:18px; min-width:0; container-type:inline-size; border-radius:13px; box-shadow:0 3px 12px rgb(43 31 71 / 2%); transition:border-color .18s,box-shadow .18s; }
.explore-card:hover { border-color:#d4c4eb; box-shadow:0 5px 20px rgb(61 38 102 / 5%); }
.explore-card-kicker { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; color:var(--muted); font-size:10px; }
.explore-card-kicker>span:first-child { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.explore-card-status { display:flex; gap:5px; align-items:center; flex:none; font-size:9px; }
.explore-card-heading { display:flex; align-items:flex-start; gap:12px; text-align:left; text-decoration:none; width:100%; color:var(--ink); background:none; border:0; padding:0; margin:0 0 19px; }
.explore-card-heading::after { content:""; position:absolute; inset:0; border-radius:13px; cursor:pointer; }
.explore-card-heading:focus-visible { outline:none; }
.explore-card-heading:focus-visible::after { outline:2px solid var(--blue); outline-offset:3px; }
.explore-card-heading .market-image { width:46px; height:46px; }
.explore-card-heading h3 { margin:0; font-size:15px; line-height:1.5; font-weight:650; letter-spacing:-.25px; overflow-wrap:anywhere; }
.explore-card-heading:hover h3 { color:var(--blue); }
.explore-card-question { margin:-5px 0 19px; color:var(--muted); font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.explore-binary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:auto; }
.explore-binary-outcome { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 4px; background:#f9f6fb; border:1px solid #f0e9f6; border-radius:8px; padding:10px; text-align:left; min-width:0; color:#87657e; }
.explore-binary-outcome.first { color:#4a708e; background:#f1f6fb; border-color:#e3edf6; }
.explore-binary-outcome:hover { border-color:#c5aad9; }
.explore-binary-outcome.first:hover { border-color:#9ab8d5; }
.explore-binary-outcome>span { grid-column:1/-1; font-size:10px; font-weight:600; overflow-wrap:anywhere; }
.explore-binary-outcome strong { font-size:20px; font-weight:650; letter-spacing:-.6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.explore-binary-outcome small { align-self:end; font-size:9px; padding-bottom:3px; }
@container (max-width:260px) {
  .explore-binary-outcome strong { grid-column:1/-1; white-space:nowrap; overflow-wrap:normal; }
  .explore-binary-outcome small { grid-column:1/-1; justify-self:start; }
}
.explore-outcomes { display:grid; gap:5px; margin-top:auto; }
.explore-outcome { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) auto 10px; align-items:center; gap:8px; width:100%; text-align:left; padding:8px 9px; border:1px solid #f0ecf5; background:#fbfafd; border-radius:7px; color:var(--ink); }
.explore-outcome:hover { border-color:#d7c5eb; background:#f4effa; }
.explore-outcome>span:first-child { font-size:11px; overflow-wrap:anywhere; }
.explore-outcome strong { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.explore-outcome small { font-size:8px; color:var(--muted); font-weight:400; }
.explore-row-arrow { color:#9d8db2; font-size:12px; }
.explore-card-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; border-top:1px solid var(--line); padding-top:12px; margin-top:17px; font-size:9px; color:var(--muted); }
.explore-card-footer .text-button { display:inline-flex; align-items:center; font-size:10px; color:var(--blue); white-space:nowrap; }
.explore-card-footer .text-button span { margin-left:4px; }
.explore-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:64px 24px; min-height:320px; text-align:center; background:#ffffffb0; box-shadow:none; }
.explore-empty-icon { display:grid; place-items:center; width:48px; height:48px; background:#f1ebf8; border-radius:14px; color:var(--blue); font-size:24px; margin-bottom:17px; }
.explore-empty h3 { font-size:20px; letter-spacing:-.4px; margin:0 0 8px; }
.explore-empty p { max-width:460px; line-height:1.8; color:var(--muted); font-size:12px; margin:0 0 22px; }
.explore-more { display:flex; justify-content:center; margin:24px 0 0; }
.explore-skeleton { min-height:240px; padding:22px; }
.explore-skeleton .skeleton i:first-child { height:48px; width:80%; }
.explore-skeleton .skeleton i:nth-child(2) { margin-top:45px; height:55px; width:100%; }
.event-panel .panel-top { justify-content:space-between; }
.event-picker { padding:0 9px 10px; max-height:calc(100dvh - 300px); overflow-y:auto; scrollbar-width:thin; scrollbar-color:#d7cee6 transparent; }
.event-selector { border-bottom:1px solid var(--line); }
.event-selector:last-child { border-bottom:0; }
.event-selector summary { list-style:none; display:flex; gap:10px; padding:13px 7px; cursor:pointer; align-items:center; border-radius:8px; }
.event-selector summary::-webkit-details-marker { display:none; }
.event-selector summary:hover { background:#faf7fd; }
.event-selector summary>.market-image { width:34px; height:34px; border-radius:8px; }
.event-selector summary>span:nth-child(2) { flex:1; min-width:0; font-size:12px; font-weight:600; line-height:1.6; overflow-wrap:anywhere; }
.event-selector summary small { display:block; font-size:9px; font-weight:400; color:var(--muted); }
.event-chevron { color:#a28eb9; }
.event-selector[open] .event-chevron { transform:rotate(180deg); }
.event-selector-markets { padding:0 0 12px 15px; border-left:1px solid #e9e0f3; margin:0 8px 8px 22px; }
.event-group-label { display:block; color:#8c7b9f; font-size:9px; padding:9px 5px 4px; }
.event-market { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; padding:9px 10px; background:none; border:1px solid transparent; border-radius:7px; text-align:left; color:var(--ink); }
.event-market:hover { background:#f7f3fc; }
.event-market.selected { background:#f3eefb; border-color:#e5d9f4; }
.event-market strong { display:block; font-size:11px; font-weight:550; line-height:1.6; overflow-wrap:anywhere; }
.event-market small { display:block; font-size:9px; color:var(--muted); margin-top:3px; font-variant-numeric:tabular-nums; }
.event-market-arrow { color:#a18cb8; flex:none; }
/* Layout modes: desktop workspace, tablet disclosure, and phone navigation. */
.nav-icon { display:none; }
.trade-shortcut { display:none; }
.event-market-disclosure>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:76px; padding:18px; cursor:pointer; list-style:none; }
.event-market-disclosure>summary::-webkit-details-marker { display:none; }
.event-market-disclosure>summary>span { display:flex; flex-direction:column; gap:4px; min-width:0; }
.event-market-disclosure>summary strong { font-size:14px; font-weight:650; }
.event-market-disclosure>summary small { color:var(--muted); font-size:10px; font-weight:400; }
.event-market-disclosure>summary>svg { width:16px; height:16px; flex:none; stroke:currentColor; stroke-width:1.5; transform:rotate(-90deg); }
.event-market-disclosure[open]>summary>svg { transform:rotate(0); }
.event-browse { display:block; margin:6px 18px 15px; min-height:36px; }
.market-primary,.market-context { min-width:0; }
.market-context { margin-top:22px; }
.market-context .detail-tabs { margin-top:0; }
#market-workspace { display:grid; grid-template-areas:"events detail ticket"; grid-template-columns:clamp(220px,18vw,280px) minmax(0,1fr) clamp(300px,24vw,360px); gap:24px; align-items:start; }
#market-workspace>.event-panel { grid-area:events; position:sticky; top:20px; }
#market-workspace>#market-detail { grid-area:detail; display:block; }
#market-workspace>.ticket-column { grid-area:ticket; position:sticky; top:20px; }
#trade-ticket { scroll-margin-top:24px; }
#positions-workspace { min-width:0; }
.app-header { width:100%; display:grid; grid-template-areas:"brand navigation search actions"; grid-template-columns:max-content max-content minmax(200px,640px) minmax(max-content,1fr); height:72px; min-height:72px; gap:24px; padding:0 var(--page-gutter); }
.app-header .brand { grid-area:brand; justify-self:start; font-size:23px; }
.app-header nav { grid-area:navigation; display:flex; position:static; align-self:stretch; align-items:stretch; justify-content:flex-start; width:auto; height:auto; min-width:0; gap:24px; order:initial; }
.app-header .nav-link { display:flex; align-items:center; justify-content:center; gap:6px; font-size:13px; padding:0 2px; }
.app-header .explore-controls { grid-area:search; width:100%; min-width:0; padding:0; order:initial; }
.app-header .explore-search { width:100%; min-width:0; max-width:none; }
.app-header .header-right { grid-area:actions; display:flex; justify-self:end; align-items:center; gap:10px; margin-left:0; }
.app-header .network-button,.app-header .wallet-button { position:static; height:44px; min-height:44px; width:auto; max-width:none; }
.app-header .network-button #network-name { display:inline; }
.app-header .wallet-button .wallet-button-label { font-size:12px; }
.app-header .wallet-button .wallet-button-label:after { content:none; }
#explore-workspace:has(.explore-subcategories:not([hidden])) .explore-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.explore-binary-outcome strong { white-space:nowrap; overflow-wrap:normal; }
@media(min-width:1600px) {
  #positions-workspace:has(.asset-summary-grid) { display:grid; grid-template-columns:280px minmax(0,1fr); gap:28px; align-items:start; }
  #positions-workspace>.asset-summary-grid { grid-column:1; grid-template-columns:minmax(0,1fr); margin-bottom:0; position:sticky; top:20px; }
  #positions-workspace>.positions-panel { grid-column:2; }
}
@media(min-width:1800px) {
  .explore-grid,#explore-workspace:has(.explore-subcategories:not([hidden])) .explore-grid { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:24px; }
  #market-workspace { grid-template-columns:260px minmax(0,1fr) 360px; gap:28px; }
  .market-overview { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr); gap:26px; }
  .market-context { margin-top:0; padding-left:24px; border-left:1px solid var(--line); }
}
@media(max-width:1199px) {
  body[data-refinement="porcelain"] { --page-gutter:24px; }
  .app-header { grid-template-areas:"brand actions" "navigation search"; grid-template-columns:max-content minmax(0,1fr); grid-template-rows:44px 44px; height:auto; min-height:0; padding:12px var(--page-gutter); gap:10px 24px; }
  .app-header .brand { font-size:22px; }
  .app-header .header-right { justify-self:end; }
  .app-header nav { height:44px; gap:20px; }
  .app-header .nav-link { font-size:12px; }
  #market-workspace { grid-template-areas:"events events" "detail ticket"; grid-template-columns:minmax(0,1fr) 320px; gap:20px; }
  #market-workspace>.event-panel { position:static; }
  #market-workspace>.ticket-column { top:20px; }
  .event-market-disclosure>summary { min-height:60px; padding:13px 18px; }
  .event-market-disclosure>summary>span { flex-direction:row; align-items:baseline; flex-wrap:wrap; gap:5px 14px; }
  .event-picker { max-height:320px; }
  .explore-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #explore-workspace:has(.explore-subcategories:not([hidden])) { grid-template-columns:172px minmax(0,1fr); gap:22px; }
  #explore-workspace:has(.explore-subcategories:not([hidden])) .explore-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1023px) {
  body[data-refinement="porcelain"] { --page-gutter:20px; }
  #explore-workspace:has(.explore-subcategories:not([hidden])) { grid-template-columns:minmax(0,1fr); gap:18px; }
  .explore-subcategories { position:static; padding:0; border:1px solid var(--line); background:#fff; border-radius:10px; }
  .subcategory-disclosure>summary { min-height:48px; padding:12px 16px; }
  .subcategory-list { max-height:240px; padding:0 8px 10px; }
  .subcategory-button { min-height:44px; padding:10px 12px; }
  .explore-grid,#explore-workspace:has(.explore-subcategories:not([hidden])) .explore-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  #market-workspace { grid-template-areas:"events" "shortcut" "detail" "ticket"; grid-template-columns:minmax(0,1fr); gap:18px; }
  #market-workspace>.ticket-column { position:static; }
  #market-workspace>.trade-shortcut { grid-area:shortcut; display:flex; justify-content:space-between; align-items:center; min-height:44px; padding:12px 16px; color:var(--blue); border:1px solid #e0d6ef; background:var(--blue-soft); border-radius:9px; font-size:13px; font-weight:600; }
  .market-overview { padding:24px; }
  .market-overview h2 { font-size:25px; }
  .ticket-column .ticket { width:100%; max-width:560px; margin-inline:auto; padding:24px; }
  .event-picker { max-height:300px; }
}
@media(max-width:767px) {
  html { scrollbar-gutter:auto; scroll-padding-bottom:90px; }
  body[data-refinement="porcelain"] { --page-gutter:16px; padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
  .app-header { position:sticky; top:0; z-index:30; grid-template-areas:"brand actions" "search search"; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:40px 44px; gap:10px 12px; height:auto; min-height:0; padding:12px var(--page-gutter); box-shadow:0 2px 12px rgb(43 31 71 / 3%); }
  .app-header .brand { grid-area:brand; font-size:21px; gap:8px; }
  .app-header .header-right { grid-area:actions; display:flex; gap:8px; }
  .app-header .network-button { grid-column:auto; grid-row:auto; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; }
  .app-header .network-button #network-name,.app-header .network-button #environment-label { display:none; }
  .app-header .wallet-button { grid-column:auto; grid-row:auto; height:40px; min-height:40px; padding:0 12px; gap:8px; }
  .app-header .wallet-button .wallet-button-address { max-width:78px; font-size:11px; }
  .app-header .explore-controls { grid-area:search; min-width:0; padding:0; }
  .app-header .explore-search { height:44px; padding:10px 12px; }
  .app-header .explore-search input { font-size:14px; }
  .app-header nav { position:fixed; grid-area:auto; grid-column:auto; grid-row:auto; left:0; right:0; bottom:0; top:auto; z-index:40; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; height:calc(68px + env(safe-area-inset-bottom)); padding:0 10px env(safe-area-inset-bottom); gap:0; background:#fff; border-top:1px solid var(--line); box-shadow:0 -4px 20px rgb(43 31 71 / 5%); }
  .app-header .nav-link { display:flex; flex-direction:column; min-width:0; min-height:64px; justify-content:center; gap:5px; padding:8px 4px; font-size:11px; }
  .app-header nav:has(#funds-nav:not([hidden])) { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .app-header .nav-link.active:after { top:0; bottom:auto; left:18%; right:18%; height:3px; border-radius:0 0 3px 3px; }
  .nav-icon { display:block; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
  .app-header .claim-count { padding:1px 4px; font-size:9px; margin-left:3px; }
  .discovery-navigation-inner { padding:0 var(--page-gutter); }
  .discovery-primary { gap:8px; }
  .explore-categories { min-height:52px; gap:3px; padding:4px 0; scrollbar-width:none; }
  .explore-category { min-height:44px; padding:10px 11px; font-size:12px; }
  main { padding:20px var(--page-gutter) 28px; }
  body[data-view="explore"] main { padding-top:16px; }
  .explore-grid,#explore-workspace:has(.explore-subcategories:not([hidden])) .explore-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .explore-card { display:flex; min-height:0; padding:17px; border-radius:12px; }
  .explore-card-kicker { font-size:11px; margin-bottom:14px; }
  .explore-card-status { font-size:10px; }
  .explore-card-heading { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
  .explore-card-heading .market-image { width:48px; height:48px; margin-bottom:0; }
  .explore-card-heading h3 { font-size:16px; line-height:1.45; letter-spacing:-.2px; }
  .explore-card-question { font-size:12px; line-height:1.7; margin:0 0 16px; }
  .explore-binary { gap:10px; margin-top:auto; }
  .explore-binary-outcome { min-height:82px; padding:11px 12px; gap:4px; }
  .explore-binary-outcome>span { font-size:11px; }
  .explore-binary-outcome strong { grid-column:1/-1; font-size:22px; }
  .explore-binary-outcome small { grid-column:1/-1; justify-self:start; font-size:9px; padding:0; }
  .explore-outcome { min-height:44px; padding:10px; grid-template-columns:minmax(0,1fr) auto; }
  .explore-outcome>span:first-child { font-size:12px; }
  .explore-outcome strong { font-size:13px; white-space:nowrap; }
  .explore-outcome small { display:inline; font-size:9px; }
  .explore-row-arrow { display:none; }
  .explore-card-footer { margin-top:14px; padding-top:8px; font-size:10px; }
  .explore-card-footer .text-button { min-height:40px; font-size:12px; }
  .explore-empty { padding:36px 20px; }
  #market-workspace { gap:14px; }
  .event-market-disclosure>summary>span { flex-direction:column; gap:3px; }
  .event-market-disclosure>summary { min-height:64px; padding:12px 16px; }
  .event-picker { max-height:300px; }
  .event-selector summary { min-height:56px; }
  .event-market { min-height:44px; }
  .market-overview { padding:18px; }
  .market-heading { gap:12px; }
  .market-image-detail { width:60px; height:60px; }
  .market-overview h2 { font-size:22px; line-height:1.35; }
  .market-context { margin-top:20px; }
  .market-context .detail-tabs button { min-height:44px; padding:12px 0; }
  .ticket-column .ticket { padding:20px; }
  #trade-ticket { scroll-margin-top:128px; }
  .ticket-column .side-selector button,.ticket-column .trade-mode button { min-height:44px; }
  #positions-workspace>.asset-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
  #positions-workspace .asset-summary-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px; }
  #positions-workspace .asset-summary-card strong { grid-column:auto; grid-row:auto; font-size:22px; text-align:left; }
  #positions-workspace .asset-summary-card>span { grid-column:auto; font-size:11px; }
  #positions-workspace .asset-summary-card:last-child { grid-column:1/-1; flex-direction:row; align-items:center; justify-content:space-between; }
  #positions-workspace .positions-panel { padding:18px; }
  .asset-row { flex-direction:column; gap:16px; padding:20px 0; }
  .asset-row-action { width:100%; max-width:none; align-items:flex-start; text-align:left; }
  .asset-row-action .lifecycle-actions { justify-content:flex-start; flex-wrap:wrap; }
  .asset-row-action .lifecycle-actions button { min-height:44px; }
  .asset-tabs { gap:18px; }
  .asset-tabs button { min-height:44px; font-size:12px; padding-bottom:12px; }
}
@media(max-width:479px) {
  body[data-refinement="porcelain"] { --page-gutter:14px; }
  .app-header .brand { font-size:20px; }
  .app-header .wallet-button[data-state="disconnected"] { width:40px; min-width:40px; padding:0; }
  .app-header .wallet-button[data-state="disconnected"] .wallet-button-label,.app-header .wallet-button[data-state="disconnected"] .wallet-button-chevron { display:none; }
}
@media(max-width:359px) {
  .app-header .brand>span:last-child { display:none; }
  .app-header .brand { gap:0; }
}
@media(prefers-reduced-motion:reduce) { .explore-card { transition:none; } }

/* A market without event siblings uses the available width for its detail and ticket. */
@media(min-width:1024px) {
  #market-workspace[data-related-markets="false"] {
    grid-template-areas:"detail ticket";
    grid-template-columns:minmax(0,1fr) clamp(300px,24vw,360px);
    width:100%;
    max-width:1200px;
    margin-inline:auto;
  }
  #market-workspace[data-related-markets="false"]>.event-panel { display:none; }
}
@media(min-width:1800px) {
  #market-workspace[data-related-markets="false"] { grid-template-columns:minmax(0,1fr) 360px; gap:28px; }
  #market-workspace[data-related-markets="false"] .market-overview { display:block; }
  #market-workspace[data-related-markets="false"] .market-context { margin-top:22px; padding-left:0; border-left:0; }
}
@media(min-width:1024px) and (max-width:1199px) {
  #market-workspace[data-related-markets="false"] { grid-template-columns:minmax(0,1fr) 320px; }
}
@media(max-width:1023px) {
  #market-workspace[data-related-markets="false"] {
    grid-template-areas:"shortcut" "detail" "ticket";
    grid-template-columns:minmax(0,1fr);
    width:100%;
    max-width:760px;
    margin-inline:auto;
  }
  #market-workspace[data-related-markets="false"]>.event-panel { display:none; }
}
