/* ══ THE FIELD AS PAGES (1 Oct 2026, option B) ═════════════════════════════════════════════════════════════════════
   With field-pages.js: the site's header and the Field's bar on top, the map as one page, every part of the Ledger as a
   full page in the site's layout. The panel content (cards, numbers, labels, buttons) is restyled to the site's parts
   on every screen size. Remove the <link> and the <script> to roll back. */
:root { --bg: #fbfaf7; --mid: #77736b; --card: #f4f2ed; --seal: #2b3a78; }

/* ── the site's header (act.css, copied rather than loaded: act.css also styles bare tags) ── */
#site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 32px; font: 14px "Instrument Sans", sans-serif; background: rgba(251,250,247,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
#site-head .m { display: inline-flex; align-items: center; gap: 10px; font-family: "Instrument Serif", serif; font-size: 26px; color: var(--ink); text-decoration: none; min-width: 180px; }
#site-head .m .logo { height: 30px; width: auto; display: block; }
#site-head nav { display: flex; gap: 6px; }
#site-head nav a { color: var(--mid); text-decoration: none; padding: 7px 14px; border-radius: 99px; }
#site-head nav a:hover { color: var(--ink); } #site-head nav a.on { color: var(--ink); background: var(--soft); }
#site-head .right { display: flex; gap: 8px; align-items: center; justify-content: flex-end; min-width: 180px; }
#site-head #btn-wallet { height: 38px; padding: 0 16px; border-radius: 99px; }

/* ── the Field's own bar ── */
#field-nav { position: fixed; top: 64px; left: 0; right: 0; z-index: 59; display: flex; gap: 4px; justify-content: center; align-items: center; height: 52px; background: rgba(251,250,247,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font: 14px "Instrument Sans", sans-serif; }
#field-nav a { color: var(--mid); text-decoration: none; padding: 7px 16px; border-radius: 99px; }
#field-nav a:hover { color: var(--ink); }
#field-nav a.on { background: var(--ink); color: #fff; }
#field-nav a.out { margin-left: 6px; }

/* ── the map page: its furniture sits below the two bars; Trade and Loans are pages now ── */
body.fp #leftcol { top: 132px !important; }
body.fp #tools { top: 132px !important; }
body.fp #btn-trade, body.fp #btn-loans { display: none !important; }
body.fp #ledger.folded { display: none !important; }
body.fp #plate { display: none; }

/* ── a page: the Ledger, full width, in the site's layout ── */
body.fp.page-mode #ledger { position: fixed !important; top: 116px !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; height: auto !important; max-height: none !important;
  z-index: 50 !important; margin: 0 !important; padding: 0 0 70px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--bg) !important; overflow: auto !important; transform: none !important; display: block !important; }
body.fp.page-mode #ledger > .head { display: none !important; }
body.fp.page-mode #leftcol, body.fp.page-mode #tools, body.fp.page-mode #card, body.fp.page-mode #tour { visibility: hidden; }
#page-head { display: none; }
body.fp.page-mode #page-head { display: block; }
#page-head .in { max-width: 1320px; margin: 0 auto; padding: 40px 40px 0; }
#page-head .k { font: 500 11px "Instrument Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mid); }
#page-head h1 { font: 400 clamp(56px, 6.4vw, 100px)/.92 "Instrument Serif", serif; letter-spacing: -.02em; margin: 6px 0 0; color: var(--ink); }
#page-head h1 em { font-style: italic; color: var(--acc); }
#page-head .lead { font: 15px/1.55 "Instrument Sans", sans-serif; color: var(--mid); margin: 12px 0 0; max-width: 640px; }
#page-head .sections { display: flex; gap: 6px; margin-top: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
#page-head .sections button { height: 36px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 13.5px "Instrument Sans", sans-serif; }
#page-head .sections button:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
#page-head .sections button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
#page-head .in:not(:has(.sections))::after { content: ""; display: block; height: 1px; background: var(--ink); margin-top: 20px; }
body.fp.page-mode #ledger-body { max-width: 1320px; margin: 22px auto 0 !important; padding: 0 40px; display: flex !important; flex-wrap: wrap; gap: 18px !important; align-items: flex-start; overflow: visible !important; height: auto !important; max-height: none !important; }
body.fp.page-mode #ledger-body > .col { flex: 1 1 380px; }
body.fp.page-mode #ledger-body > .col.wide, body.fp.page-mode #ledger-body > .daob-host { flex-basis: 100%; }

/* ── the panels, in the site's parts (every screen size) ── */
#ledger-body > .col { background: #fff !important; border: 1px solid var(--line) !important; border-radius: 18px !important; padding: 20px 22px !important; box-shadow: none !important; }
#ledger-body > .col + .col { border-left: 1px solid var(--line) !important; border-top: 1px solid var(--line) !important; padding-left: 22px !important; }
#ledger-body h3 { font-size: 28px !important; line-height: 1 !important; margin: 0 0 10px !important; }
#ledger-body h4 { font: 500 11px "Instrument Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mid); }
#ledger-body .dim, #ledger-body .fine { color: var(--mid); }
#ledger-body .sub { background: transparent !important; padding: 0 !important; border-radius: 0 !important; }
/* the big figures: no more orange slabs, the site's serif numerals with a spaced label above */
#ledger-body .tvl { background: transparent !important; color: var(--ink) !important; border: 0 !important; box-shadow: none !important; padding: 4px 0 10px !important; text-align: left !important; border-radius: 0 !important; }
#ledger-body .tvl small { display: block; font: 500 11px "Instrument Sans", sans-serif !important; letter-spacing: .14em !important; text-transform: uppercase; color: var(--mid) !important; opacity: 1 !important; }
#ledger-body .tvl b { display: block; font: 400 64px/.95 "Instrument Serif", serif !important; letter-spacing: -.02em !important; color: var(--ink) !important; margin-top: 4px; }
/* folds read as section heads */
#ledger-body details.fold > summary { font: 600 15px "Instrument Sans", sans-serif !important; padding: 10px 0 !important; border-bottom: 1px solid var(--line) !important; }
#ledger-body details.fold > summary .n { font: 500 12px "Instrument Sans", sans-serif; color: var(--mid); margin-left: 8px; }
/* rows */
#ledger-body .entry { border-bottom: 1px solid var(--line); padding: 8px 0; }
#ledger-body .entry:last-child { border-bottom: 0; }
/* buttons: the site's pills */
#ledger-body button, #page-head button { border-radius: 99px; }
#ledger-body button.gold { background: var(--ink); color: #fff; border-color: var(--ink); }
#ledger-body button.gold:hover { background: var(--acc); border-color: var(--acc); }
#ledger-body .warn { border-radius: 12px; }

/* the DAO board on the Treasury page, above the creator fees */
body.fp.page-mode #dao-host { max-width: 1320px; margin: 22px auto 0; padding: 0 40px; }
#dao-host .daob .dhead { padding-top: 0; }
#ledger-body > .daob-host { background: transparent !important; border: 0 !important; padding: 0 !important; }
.daob .dcol { background: #fff !important; border: 1px solid var(--line); }
.daob .dhead { border-bottom-color: var(--line) !important; }

/* lot tiles: white with a hairline; a vault gets an ink outline and an orange mark, not an orange slab */
#lot-list.lotgrid .entry.lot { border: 1px solid var(--line) !important; box-shadow: none !important; background: #fff !important; }
#lot-list.lotgrid .entry.lot > span:first-of-type { font: 500 13px "Instrument Sans", sans-serif !important; }
#lot-list.lotgrid .entry.lot .dim { font: 500 9px "Instrument Sans", sans-serif !important; letter-spacing: .12em !important; color: var(--mid) !important; }
#lot-list.lotgrid .entry.lot.vault { border-color: var(--ink) !important; background: #fff !important; }
#lot-list.lotgrid .entry.lot.vault .dim { color: var(--acc) !important; }
#lot-list.lotgrid .entry.click:hover { border-color: var(--ink) !important; transform: translateY(-1px); }

/* ── stage 2: the bell, the sign-in card, the phone's section pills ── */
#fp-bell { position: relative; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-grid; place-items: center; font-size: 15px; cursor: pointer; }
#fp-bell[hidden] { display: none; }
#fp-bell:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
#fp-bell.dot::after { content: ""; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px #fff; }
#fp-bell b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--acc); color: #fff; font: 600 10.5px/18px "Instrument Sans", sans-serif; }
#fp-bell b:empty { display: none; }
#fp-signin { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 70; width: min(440px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--ink); border-radius: 18px; padding: 18px 20px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.45); font: 14px/1.5 "Instrument Sans", sans-serif; color: var(--ink); animation: fp-up .35s cubic-bezier(.2,.8,.2,1) both; }
#fp-signin .t { font: 400 24px/1.1 "Instrument Serif", serif; }
#fp-signin p { margin: 6px 0 12px; color: var(--mid); }
#fp-signin .b { display: flex; gap: 8px; }
#fp-signin button { height: 38px; padding: 0 18px; border-radius: 99px; }
@keyframes fp-up { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
body.fp-phone #fp-signin { bottom: 96px; }
#ph-sections { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
#ph-sections:empty { display: none; }
#ph-sections .sections { display: flex; gap: 6px; }
#ph-sections button { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 13px "Instrument Sans", sans-serif; }
#ph-sections button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
body.fp-phone #ph-top #fp-bell { width: 34px; height: 34px; margin-left: auto; margin-right: 6px; }
body.fp-phone #dao-host { margin: 0 0 10px; }
/* the notices themselves, in the site's look */
#mm-resign-notice > div, #vote-notice > div, #dao-notice > div { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; outline: 0 !important; border-radius: 22px !important; box-shadow: 0 30px 70px -30px rgba(0,0,0,.45) !important; font-family: "Instrument Sans", sans-serif !important; }
#mm-resign-notice, #vote-notice, #dao-notice { background: rgba(17,17,17,.35) !important; backdrop-filter: blur(2px); z-index: 80 !important; }

/* the trade board and the loan book open over a page, not under it */
body.fp #trade-board, body.fp #loan-board, body.fp #wizard { z-index: 75 !important; }
/* deeds: white tiles with a hairline, the number in the serif, the site's small labels; no tilt */
.deed-card { border: 1px solid var(--line) !important; border-radius: 16px !important; box-shadow: none !important; background: #fff !important; }
.deed-card:hover { transform: translateY(-2px) !important; border-color: var(--ink) !important; box-shadow: none !important; }
.deed-card b { font: 400 20px/1.1 "Instrument Serif", serif !important; }
.deed-card small { font: 500 11px "Instrument Sans", sans-serif !important; color: var(--mid) !important; }
.deed-card .stk { font: 500 10.5px "Instrument Sans", sans-serif !important; letter-spacing: .04em !important; border-radius: 99px !important; }
.deed-card .stk.on { background: #eef6ef !important; color: #1f5e3c !important; }
.deed-card .stk.mm { background: var(--soft) !important; color: var(--ink) !important; }
/* the staking band: a quiet card with the site's label, not a lime slab */
.okbox.stake-band { background: #fff !important; border: 1px solid var(--line) !important; border-left: 3px solid #2f8a3e !important; border-radius: 14px !important; box-shadow: none !important; }
.stake-lab { font: 500 11px "Instrument Sans", sans-serif !important; letter-spacing: .14em !important; color: #2f8a3e !important; }
.stake-due { font: 400 22px/1.15 "Instrument Serif", serif !important; }
/* the Descent chests: a white card with an orange edge */
.chest-card { border: 1px solid var(--line) !important; border-left: 3px solid var(--acc) !important; border-radius: 14px !important; background: #fff !important; }
.chest-card.no-vault, .chest-card.no-piece, .chest-card.no-wallet { border-left-style: dashed !important; }
/* the trade board's cards: a hairline, not a heavy outline */
#trade-board .tb-card, #trade-board .tb-row { border: 1px solid var(--line) !important; box-shadow: none !important; border-radius: 16px !important; }
#trade-board .tb-card:hover { border-color: var(--ink) !important; }
#trade-board .tb-head h2, #loan-board .tb-head h2 { font: 400 34px/1 "Instrument Serif", serif !important; }
#trade-board .tb-card { outline: 0 !important; background: #fff !important; }

/* ── the phone: the site's header, then one slim Field row (1 Oct) ── */
body.fp-phone #ph-top { display: none !important; }
#site-head.ph { height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0; }
#site-head.ph .m { min-width: 0; font-size: 22px; gap: 8px; } #site-head.ph .m .logo { height: 24px; }
#site-head.ph nav { gap: 0; } #site-head.ph nav a { padding: 5px 7px; font-size: 13px; }
#ph-strip { position: fixed; top: calc(52px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 59; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: rgba(251,250,247,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
#ph-strip .t { font: 400 19px/1 "Instrument Serif", serif; white-space: nowrap; }
#ph-strip .ph-count, #ph-strip #ph-count { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 10.5px "Instrument Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); }
#ph-strip #fp-bell { width: 34px; height: 34px; margin: 0; flex: none; }
#ph-strip #btn-wallet { margin: 0 !important; height: 34px !important; max-width: 44vw; padding: 0 13px !important; font-size: 12.5px !important; border-radius: 99px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.fp-phone #ledger { top: calc(108px + env(safe-area-inset-top, 0px)) !important; }

/* ── 1 Oct: the phone sheet scrolls as ONE page. It used to scroll an inner box (#ledger-body) inside the fixed sheet:
   phones (iPhones most) often refuse to move a nested scroller, and on the Treasury the board sat outside it and could
   not move at all. Now the sheet itself scrolls, its head stays pinned at the top. */
body.fp-phone #ledger { overflow-y: auto !important; overflow-x: hidden !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; display: block !important; }
body.fp-phone #ledger > .head { position: sticky; top: 0; z-index: 6; background: #fff; padding-bottom: 6px; box-shadow: 0 -60px 0 #fff; }   /* the shadow fills the sheet's top padding, so nothing scrolls into view above the head */
body.fp-phone #ph-sections { position: sticky; top: 52px; z-index: 2; background: #fff; }
body.fp-phone #ledger-body { flex: none !important; overflow: visible !important; height: auto !important; max-height: none !important; min-height: 0 !important; }
body.fp-phone .daob .tx, body.fp-phone #ledger-body [style*="overflow:auto"], body.fp-phone #ledger-body [style*="overflow: auto"] { max-height: none !important; overflow: visible !important; }

/* the small live map beside each page's title (option B, as mocked), back to the map */
#page-head .top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: end; }
#page-head .top > * { min-width: 0; }
#page-head .minimap { position: relative; display: block; height: 190px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #e7e1d3; box-shadow: 0 20px 40px -30px rgba(0,0,0,.4); }
#page-head .minimap canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
#page-head .minimap .mm-pill { position: absolute; left: 12px; bottom: 12px; background: #fff; border: 1px solid var(--ink); border-radius: 99px; padding: 6px 14px; font: 500 13px "Instrument Sans", sans-serif; color: var(--ink); }
#page-head .minimap:hover .mm-pill { background: var(--ink); color: #fff; }
@media (max-width: 1100px) { #page-head .top { grid-template-columns: minmax(0, 1fr) 280px; } #page-head .minimap { height: 150px; } }

/* the map's search (1 Oct): a lot by number, an estate by name or wallet; on the map only */
#map-search { position: fixed; top: 132px; left: 50%; transform: translateX(-50%); z-index: 45; width: min(380px, calc(100vw - 32px)); font: 14px "Instrument Sans", sans-serif; }
body.page-mode #map-search, body:not(.fp) #map-search { display: none; }
#map-search .g { position: absolute; left: 15px; top: 10px; font-size: 17px; color: var(--mid); pointer-events: none; }
#map-search input { width: 100%; box-sizing: border-box; height: 42px; margin: 0; padding: 0 16px 0 38px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); font: 14px "Instrument Sans", sans-serif; color: var(--ink); }
#map-search input:focus { outline: 0; border-color: var(--ink); }
#map-search .ms-list { margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 24px 50px -24px rgba(0,0,0,.35); }
#map-search .ms-list[hidden] { display: none; }
#map-search .ms-row { display: flex; align-items: center; gap: 6px; }
#map-search .ms-list button { flex: 1; display: block; width: 100%; min-width: 0; height: auto; margin: 0; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; box-shadow: none; }
#map-search .ms-list button:hover { background: var(--soft); }
#map-search .ms-list b { display: block; font: 400 19px/1.1 "Instrument Serif", serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #map-search .ms-list small { color: var(--mid); font-size: 12px; }
#map-search .ms-row a { flex: none; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 99px; color: var(--ink); text-decoration: none; font-size: 12.5px; }
#map-search .ms-row a:hover { background: var(--ink); color: #fff; }
#map-search .ms-list p { margin: 8px 10px; color: var(--mid); }
body.fp-phone #map-search { top: calc(118px + env(safe-area-inset-top, 0px)); }
body.fp-phone:has(#ledger:not(.folded)) #map-search, body.fp-phone:has(#ph-more) #map-search { display: none; }
/* 1 Oct: the floor inside Market uses the whole width, so its three columns sit side by side as on /floor */
body.fp.page-mode.mk-wide #ledger-body { max-width: none !important; padding: 0 16px !important; }
