/* Visual pass 37 (owner, 01.10.2026 — manual testnet pass, build 0LAIoV). Loaded last. Live shell unless a rule says otherwise. */

/* 07.10 local V4: Docs uses the prose face; give its full wallet label room at desktop width. */
@media (min-width:1200px){
  #app.ui15.live-ui>.docs-shell .topbar09 .head-actions>.wallet-button{--wb35:176px}
}

/* ---------------------------------------------------------------- 10. «сверху в той же строке, где кошелек, много слева свободного
   места. давай туда заголовки перенесем». From 1200 px the page title (icon + name) stands in the TOP BAR, left, on the wallet's
   row; the page's first row (Wardrobe / Rewards tabs, Epoch strip, Tickets strip, SET banner, Claimable strip, Docs search) gets
   the whole width back, and Lucky Paw loses its separate title row (its machine gains that height). Markup unchanged
   (ui.mjs heading()); the title is laid over the top bar. Below 1200 px the title keeps its compact own row (phones, tablets). */
@media screen and (min-width:1200px){
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head>.page-title09,
  #app#app.ui15.live-ui>.docs-shell>.page-head>.page-title09{
    position:absolute!important;left:16px!important;top:0!important;height:var(--top37,57px)!important;width:max-content;max-width:calc(100% - var(--act37,560px));
    display:flex!important;align-items:center;gap:10px!important;padding:0!important;margin:0!important;
    background:none!important;border:0!important;box-shadow:none!important;z-index:7;pointer-events:none;translate:none!important;clip-path:none!important;overflow:visible}
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head>.page-title09 h1,
  #app#app.ui15.live-ui>.docs-shell>.page-head>.page-title09 h1{font-size:30px!important;line-height:1!important;white-space:nowrap!important;filter:drop-shadow(0 2px 0 #1b0d05)}
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head>.page-title09>.icon,
  #app#app.ui15.live-ui>.docs-shell>.page-head>.page-title09>.icon{width:28px!important;height:30px!important;flex:none}
  /* the header is the top bar only, on every page (Lucky Paw included) */
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head.has-title09,
  #app#app.ui15.live-ui>.docs-shell>.page-head.has-title09{min-height:0!important;height:auto!important;padding-top:0!important}
  #app#app.ui15.live-ui>.workspace.page-lucky-paw>.page-head::after{content:none!important}
  #app#app.ui15.live-ui>.workspace.page-lucky-paw .head-actions{margin-top:0!important}
  /* the first row no longer makes room for the title */
  #app#app.ui15.live-ui>.workspace.page-mine>#main>.epoch-bar:first-child,
  #app#app.ui15.live-ui>.workspace.page-tickets>#main>.epoch-bar:first-child,
  #app#app.ui15.live-ui>.workspace:is(.page-my-fox,.page-my-fox-rewards)>#main>.tabs:first-child,
  #app#app.ui15.live-ui>.workspace.page-trait-hunt>#main>.hunt-banner16:first-child,
  #app#app.ui15.live-ui>.workspace.page-account>#main [data-account-root]>.acc-basket{margin-left:0!important}
  #app#app.ui15.live-ui>.docs-shell>.docs-header{padding-left:revert-layer!important}
  /* Lucky Paw: its line «Spin for traits…» stands next to the title in the top bar where there is room (>=1440), else it goes */
  #app#app.ui15.live-ui>.workspace.page-lucky-paw .l17-sub{display:none!important}
}
@media screen and (min-width:1440px){
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head>.page-title09 h1,
  #app#app.ui15.live-ui>.docs-shell>.page-head>.page-title09 h1{font-size:34px!important}
  #app#app.ui15.live-ui>.workspace:not(.page-home)>.page-head>.page-title09>.icon,
  #app#app.ui15.live-ui>.docs-shell>.page-head>.page-title09>.icon{width:32px!important;height:34px!important}
  #app#app.ui15.live-ui>.workspace.page-lucky-paw>.page-head>.page-title09::after{content:'Spin for traits. Dress your Fennec.';margin-left:10px;
    font:600 15px/1.2 Interface,sans-serif;letter-spacing:.3px;color:#e4d6ff;white-space:nowrap;text-shadow:0 1px 2px #000}
}

/* ---------------------------------------------------------------- 11. «восклицательный знак на каких-то страницах есть, на каких-то
   нет». The notice button has ONE place and size on every page: its 32 px slot is always reserved at the end of the top bar (empty
   when there is nothing to tell), so the wallet button and the chips never move when a notice appears or goes. */
#app#app.ui15.live-ui .topbar09 .head-actions>.header-notice-slot16{display:block!important;flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:32px!important;margin:0!important}
@media screen and (max-width:700px){
  #app#app.ui15.live-ui .topbar09 .head-actions>.header-notice-slot16{flex-basis:28px!important;width:28px!important;min-width:28px!important;height:28px!important}
}

/* ---------------------------------------------------------------- 3. Tickets: «фон слишком яркий, кислотный». The portal scene
   is graded to the other pages' night tone: a little less saturation and light on the picture itself, plus the same kind of night
   veil the composed pages use (darker at the edges, the portal and its golden path keep their light). The art is not redrawn. */
#app#app .tickets12>.reveal-stage .owner-scenery12>.scene-world12{filter:saturate(.78) brightness(.86) contrast(.97)}
#app#app .tickets12>.reveal-stage .owner-portal12{position:relative}
#app#app .tickets12>.reveal-stage .owner-portal12::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;
  background:radial-gradient(ellipse 58% 52% at 50% 46%,#0a0b2600 0,#0a0b2600 42%,#0a0b2659 78%,#0a0b268c 100%),linear-gradient(#0a0b2633,#0a0b2600 30%,#0a0b2600 70%,#0a0b2640)}

/* ---------------------------------------------------------------- 2. Trait Hunt: the fennec icon in the corner of «YOUR FENNEC»
   («он там не к месте»). The shortcut to My Fox is in the menu; the card's header keeps only its title. */
#app#app .hunt-portrait08>header>a[href="/my-fox"]{display:none!important}

/* ---------------------------------------------------------------- 5. Mine: «в переходном состоянии (после Claim / находки) картинка
   смещается». While a Claim is being signed / confirmed the card showed the timer AND a two-line status under it; rows 3-4 grew
   and the Ticket square shrank (322 -> 284 px at 1440x810) and grew back after the receipt. Now that status takes the same two
   rows as every other state's status block, the timer sits in its top-right corner, and the Ticket never changes size. */
@media (min-width:960px){
  #app#app .workspace.page-mine .claim-card>.countdown:has(+.claim-state36){grid-row:3 / span 2!important;grid-column:1!important;align-self:start!important;justify-self:end!important;
    position:relative;z-index:2;margin:9px 12px 0 0!important;height:auto!important;min-height:0!important;font-size:22px!important;line-height:1.1!important;
    padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
  #app#app .workspace.page-mine .claim-card>.countdown+.claim-state36{grid-row:3 / span 2!important;grid-column:1!important;align-self:center!important;padding:10px 84px 10px 12px!important;min-height:0}
  #app#app .workspace.page-mine .claim-card>.countdown+.claim-state36>small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
}

/* ---------------------------------------------------------------- 7. My Fox > Rewards & Return: «две отдельные рамки (Rewards и Trait
   Hunt), сейчас рамка уехала и растянулась». The claimable block is no longer one frame with a darker half inside it: Rewards
   and Trait Hunt are two whole frames side by side (each with its own picture: the gift, the magnifier), and the basket's total
   with the one «Collect all» button is a row under both frames - it never overlaps a frame's content. (>= 701 px; on phones the
   two frames stack, the row stays under them.) */
@media (min-width:701px){
  html #app#app .rewards17>.claimable16{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:10px 12px!important;overflow:visible!important}
}
html #app#app .rewards17>.claimable16>.claim-half17{position:relative!important;overflow:hidden!important;isolation:isolate;min-width:0;
  border:1px solid #67528f!important;border-radius:8px!important;box-shadow:inset 0 1px 0 #ad8bc50c!important;
  background:#080e24!important;padding:12px 14px!important}
html #app#app .rewards17>.claimable16>.claim-half17>.claim-art17{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  object-fit:cover!important;object-position:70% 50%;z-index:-1!important;opacity:1!important}
html #app#app .rewards17>.claimable16>.claim-half17::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,#0a0b26d9 0,#0a0b268c 45%,#0a0b2600 75%),linear-gradient(#0a0b2659,#0a0b2600 35%,#0a0b2600 65%,#0a0b2680)}
html #app#app .rewards17>.claimable16>.claimable-foot17{grid-column:1 / -1!important;display:flex!important;align-items:center;justify-content:space-between;gap:14px;
  min-height:46px;margin:0!important;padding:0 2px!important;background:none!important;border:0!important}
html #app#app .rewards17>.claimable16>.claimable-foot17>.btn{flex:0 1 330px!important;width:auto!important;min-width:200px;margin:0!important}
@media (max-width:700px){
  html #app#app .rewards17>.claimable16{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  html #app#app .rewards17>.claimable16>.claim-half17{min-height:150px}
  html #app#app .rewards17>.claimable16>.claimable-foot17{flex-wrap:wrap}
  html #app#app .rewards17>.claimable16>.claimable-foot17>.btn{flex:1 1 100%!important}
}

/* ---------------------------------------------------------------- 12. Layout stability, site-wide (owner 01.10: «на всех страницах после
   некоторых действий/состояний дёргается, меняется размер»). Measured with scripts/layout-shift-check.mjs and
   scripts/local-fast-cls.mjs (PerformanceObserver 'layout-shift'); every rule below names the shift it removes. */
/* 12e. Docs deep links: the server-rendered article (for search engines / no-JS) sat inside #app in normal flow, then the app frame
   replaced it and #app moved 233 x 60 px (CLS 0.167 on every /docs/<article> load at 1920). It is now a fixed, scrollable layer
   of its own, so #app has no box until the frame mounts; readers without JavaScript still scroll the same article. */
#app>main.nojs-article{position:fixed!important;inset:0!important;overflow:auto!important;margin:0!important;max-width:none!important;box-sizing:border-box;
  padding:30px max(22px,calc((100vw - 850px) / 2))!important}
/* 12a. First paint: the «Opening Fennec…» boot line sat in a 150 px #app at the top, then the app frame replaced it 18 px lower
   (body + #app moved: CLS 0.016 on EVERY page load, 0.036 on phones). The boot line is now a fixed overlay and #app's margin no
   longer collapses through <body>, so the frame appears in place without moving anything. */
html body{display:flow-root}
#app>.boot{position:fixed!important;inset:0!important;display:grid!important;place-items:center!important;margin:0!important}
/* 12b. Mine epoch strip: «Epoch — · Checking · — / 512» -> «Epoch 1 · Active · 17 / 512» changed the three words' widths and slid
   the progress bar 30 px left on connect / first data. Each field has a fixed width for its longest value. */
@media (min-width:701px){
  #app#app .epoch-bar[data-epoch-bar]>[data-epoch-id]{display:inline-block;min-width:6.4em;white-space:nowrap}
  #app#app .epoch-bar[data-epoch-bar]>[data-epoch-state]{display:inline-block;min-width:5.6em;text-align:center;white-space:nowrap}
  #app#app .epoch-bar[data-epoch-bar]>[data-epoch-count]{display:inline-block;min-width:8.6em;white-space:nowrap;font-variant-numeric:tabular-nums}
  /* Tickets strip: «Owned Tickets —» -> «Owned Tickets 2» */
  #app#app .page-tickets #main>.epoch-bar>span>strong{display:inline-block;min-width:2.2ch;font-variant-numeric:tabular-nums}
}
/* 12c. Mine metrics: «0 H/s» -> «123.4 kH/s» / Accepted 0 -> 12 resized the metric boxes and moved their neighbours while mining.
   The metric values keep a width for their longest form (tabular figures). */
#app#app .mining-controls [data-hash-rate]{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;white-space:nowrap}
/* the Hash rate box holds its longest text («avg 12.3 kH/s over 4.2 s», ~172 px at 1440) in every state («0 H/s», «measuring…») */
@media (min-width:701px){#app#app .mining-controls>.metric:has([data-hash-rate]){flex:0 0 11.2em!important;width:11.2em;min-width:0;box-sizing:border-box}}
#app#app .mining-controls [data-miner-accepted]{display:inline-block;min-width:3ch;font-variant-numeric:tabular-nums}

/* ---------------------------------------------------------------- 9. Lucky Paw «Mint & Wear preview» (owner: «покрасивее; кнопки в ряд
   внизу; без горизонтального скролла; картинка феннека по высоте до конца текста; текст не скачет при появлении цены»). Styles
   the window as Sol now builds it (live-roulette.mjs previewMarkup: one window, choice Wear / Mint & Wear, consequence line,
   «Don't ask again», three actions). Desktop: the Fennec square on the left is exactly as tall as the text column (every text
   slot has a fixed height: the status, the price and the consequence lines are reserved, so nothing moves when the price or the
   outfit arrives or when Wear <-> Mint & Wear switches); one row of buttons under both; the window never scrolls sideways. */
#dialog:has(>.live-result-preview){width:min(780px,calc(100vw - 24px))!important;max-width:none!important;min-width:0!important;overflow-x:hidden!important;overflow-y:auto!important;
  padding:24px 28px 22px!important;box-sizing:border-box}
#dialog:has(>.live-result-preview)>h2{margin:0 40px 16px 0!important;font-size:34px!important;line-height:1.1!important}
#dialog>.live-result-preview{--mw-art:316px;display:grid!important;grid-template-columns:var(--mw-art) minmax(0,1fr)!important;grid-template-rows:repeat(7,auto) auto!important;
  column-gap:22px!important;row-gap:8px!important;align-items:start!important;min-width:0!important;width:100%}
#dialog>.live-result-preview>.l17-preview-info{display:contents!important}
#dialog>.live-result-preview>.l17-preview-art{grid-column:1;grid-row:1 / 8;align-self:stretch!important;width:var(--mw-art)!important;height:auto!important;aspect-ratio:auto!important;margin:0!important;
  border:2px solid #c9953a;border-radius:8px;box-shadow:inset 0 0 0 2px #2a1206,0 0 22px #ffb3471f}
#dialog>.live-result-preview>.l17-preview-art .fox-stage img,#dialog>.live-result-preview>.l17-preview-art img{object-fit:cover!important}
#dialog>.live-result-preview .l17-preview-item{grid-column:2;height:52px;margin:0!important;overflow:hidden}
#dialog>.live-result-preview .l17-preview-item strong{font-size:20px!important;margin-bottom:4px}
#dialog>.live-result-preview .l17-choice{grid-column:2;height:60px;margin:0!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
#dialog>.live-result-preview .l17-choice-opt{height:60px!important;min-height:0!important;min-width:0!important;overflow:hidden;text-align:left;padding:8px 12px!important}
#dialog>.live-result-preview .l17-choice-opt small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dialog>.live-result-preview .l17-preview-status{grid-column:2;height:20px;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:600 14px/20px Interface,sans-serif!important}
#dialog>.live-result-preview .l17-preview-cost{grid-column:2;height:22px;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:700 16px/22px Interface,sans-serif!important;color:#ffe08a!important}
#dialog>.live-result-preview .l17-preview-consequence{grid-column:2;height:40px;margin:0!important;overflow:hidden;display:flex;gap:8px;align-items:flex-start;
  font:500 13.5px/20px Interface,sans-serif;color:#ffc9a3}
#dialog>.live-result-preview .l17-preview-consequence::before{content:"!";flex:none;display:grid;place-items:center;width:18px;height:18px;margin-top:1px;border-radius:50%;
  background:#e8a33a;color:#1a0d05;font:800 12px/1 Interface,sans-serif}
#dialog>.live-result-preview .l17-preview-preference{grid-column:2;height:22px;margin:0!important;display:flex!important;align-items:center;gap:8px;cursor:pointer;
  font:600 13.5px/22px Interface,sans-serif!important;color:#e6dcff!important;text-transform:none!important;letter-spacing:0!important}
#dialog>.live-result-preview .l17-preview-preference>input{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:none!important;accent-color:#ffd35a;flex:none}
#dialog>.live-result-preview .l17-preview-note{grid-column:2;height:52px;margin:0!important;overflow:hidden;font:500 12.5px/17px Interface,sans-serif!important;color:#b9b0dc!important}
#dialog>.live-result-preview .l17-preview-actions{grid-column:1 / -1!important;grid-row:8;display:flex!important;flex-wrap:nowrap!important;justify-content:flex-end!important;gap:10px!important;
  margin:10px 0 0!important;padding-top:14px;border-top:1px solid #4b3a86;min-width:0}
#dialog>.live-result-preview .l17-preview-actions>.btn{flex:0 0 auto!important;width:auto!important;min-width:110px!important;min-height:46px!important;margin:0!important;white-space:nowrap}
#dialog>.live-result-preview .l17-preview-actions>.btn.primary{min-width:190px!important}
@media (max-width:700px){
  #dialog:has(>.live-result-preview){padding:18px 16px 16px!important}
  #dialog:has(>.live-result-preview)>h2{font-size:26px!important}
  #dialog>.live-result-preview{--mw-art:min(240px,100%);grid-template-columns:minmax(0,1fr)!important;grid-template-rows:none!important}
  #dialog>.live-result-preview>.l17-preview-art{grid-column:1;grid-row:auto;justify-self:center;width:var(--mw-art)!important;aspect-ratio:1!important;height:auto!important}
  #dialog>.live-result-preview .l17-preview-item,#dialog>.live-result-preview .l17-choice,#dialog>.live-result-preview .l17-preview-status,#dialog>.live-result-preview .l17-preview-cost,
  #dialog>.live-result-preview .l17-preview-consequence,#dialog>.live-result-preview .l17-preview-preference,#dialog>.live-result-preview .l17-preview-note{grid-column:1}
  #dialog>.live-result-preview .l17-preview-actions{grid-column:1!important;grid-row:auto;justify-content:stretch!important}
  #dialog>.live-result-preview .l17-preview-actions>.btn{flex:1 1 0!important;min-width:0!important}
  #dialog>.live-result-preview .l17-preview-actions>.btn.primary{flex:1.6 1 0!important;min-width:0!important}
}

/* ---------------------------------------------------------------- 6. Reveal plate on the Tickets portal («Waiting for on-chain
   confirmation… / Revealing your Fennec…»): «табличку шире, чтобы подзаголовок влезал в одну строку». The plate takes the width
   of its longest line (up to the stage's width less 12 px each side) instead of a fixed 440 px, so the line under the title stays
   on one line whenever the stage is wide enough (1200 px and up). */
@media (min-width:701px){
  #app#app .tickets12>.reveal-stage>.reveal-actions>.cs36-redeem{width:max-content!important;min-width:min(440px,calc(100% - 24px));max-width:calc(100% - 24px)!important}
}
/* 12d. Phones, Mine epoch strip: while loading «Epoch — · Checking · — / 512 Tickets» needs three lines, with data «Epoch 1 · Active ·
   17 / 512 Tickets» two - the whole Mine page jumped 41 px up on every visit (CLS 0.157 at 375x812). The count always has its own
   line now, so the strip keeps one height in every state. */
@media (max-width:700px){
  #app#app .epoch-bar[data-epoch-bar]>[data-epoch-count]{flex:0 0 100%!important;margin-left:0!important}
  #app#app .epoch-bar[data-epoch-bar]>[data-epoch-count]~.divider,#app#app .epoch-bar[data-epoch-bar]>.divider:has(+[data-epoch-count]){display:none!important}
}

/* ---------------------------------------------------------------- 8. Lucky Paw: «после прокрутки экран размер поменял». Measured
   (1440x810): after a spin the Latest result card grew 83 -> 119 px, the «You have N undecided results…» line added 37 px to Roll
   details, and the «mint-and-wear-trait · UNKNOWN / Recheck transaction» strip was inserted ABOVE the page (+82 px; the panel
   column overflowed and the frame scrolled). Now: Roll details always reserves its two text lines (the description or that
   notice), Latest result always has the height of a result card, and a transaction-recovery strip floats over the top-right
   corner of the page instead of pushing it (any page; Sol removes the strip itself - this only guarantees it can never move
   the layout). */
#app#app .workspace>.live-notice[data-recovery]{position:absolute!important;top:64px;right:16px;z-index:40;margin:0!important;max-width:min(460px,calc(100% - 32px));
  background:#0b0a26f2!important;box-shadow:0 10px 30px #02010caa}
@media (min-width:1280px){
  #app#app .l17-roll>p{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:34px;margin:6px 0 0!important;
    font-size:12.5px!important;line-height:17px!important}
  #app#app .l17-side>.l17-latest{height:127px;min-height:127px;max-height:127px;box-sizing:border-box;overflow:hidden}
  #app#app .l17-side>.l17-latest>.l17-empty{display:grid;place-items:center;min-height:70px;margin:0!important}
}
@media (min-width:1280px) and (max-height:860px){
  #app#app .l17-side>.l17-latest{height:119px;min-height:119px;max-height:119px}
}

/* ---------------------------------------------------------------- My Fox slot buttons now name what is worn in each slot (Sol:
   <small class="live-slot-trait"> inside the label). Two lines inside the same button height: the slot name, under it the worn
   trait (one line, ellipsis; «None» dimmer) - the buttons, the preview and the inventory keep their sizes. */
#app#app .inventory-categories>button>span:has(>.live-slot-trait){display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;min-width:0;
  line-height:1.15!important;text-align:left;overflow:hidden}
#app#app .inventory-categories>button .live-slot-trait{display:block;max-width:100%;margin-top:2px;font:500 10.5px/1.15 Interface,sans-serif!important;letter-spacing:0;
  color:#cfc3f2;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:none}
#app#app .inventory-categories>button .live-slot-trait[title="None"]{opacity:.5}
#app#app .inventory-categories>button.active .live-slot-trait{color:#ffe3a3}
#app#app .live-wardrobe .inventory-categories>button:has(.live-slot-trait){padding-top:3px!important;padding-bottom:3px!important}

/* 12f. Toast: its width followed the message (235 <-> 543 px), so a new message moved its left edge across the page (the only shift
   left in the local wallet flows, CLS 0.0029 on Rewards after Claim). One width for every message; long ones wrap inside it. */
#app~#toast,body>#toast{width:min(440px,calc(100vw - 28px))!important;max-width:none!important;box-sizing:border-box}

/* Nine navigation links: keep readable rows and allow the list to scroll within the existing rail. */
#app>.sidebar .nav-list{min-height:0;overflow-y:auto;overflow-x:hidden;grid-auto-rows:max-content;scrollbar-width:thin}
#app>.sidebar>.brand,#app>.sidebar>.sidebar-bottom{flex-shrink:0}
