/* Visual pass 35 (owner, 30.09.2026). Loaded last. Live shell only unless a rule says otherwise. */

/* ---------------------------------------------------------------- 3. «убрав отдельную строку под заголовок и переместив его
   ниже в начало строки, где у нас уже идёт наполнение или подзаголовки. кроме автомата»
   From 1200 px up the page title (icon + name) no longer has a row of its own: it stands at the start of the page's first row
   (left of the Wardrobe / Rewards tabs, of the Epoch strip, of the Tickets strip, of the Claimable strip, of the Docs search)
   and that row moves right by the title's width (--pt35-w, measured in ui.mjs). The title stays in the header markup; it
   follows the page's scroll (--ms35, ui.mjs) and is clipped at the frame's content edge. Lucky Paw and Home keep theirs. */
@media screen and (min-width:1200px){
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>.page-head>.page-title09,
  #app.ui15.live-ui>.docs-shell>.page-head>.page-title09{
    position:absolute!important;left:14px;top:calc(100% + 14px);height:var(--r1-35,44px)!important;width:max-content;max-width:none;
    display:flex!important;align-items:center;gap:10px!important;padding:0 2px!important;margin:0!important;
    background:none!important;border:0!important;box-shadow:none!important;z-index:7;pointer-events:none;
    translate:0 calc(var(--ms35,0) * -1px);clip-path:inset(max(0px,calc(var(--ms35,0) * 1px - 14px)) -24px -24px -24px)}
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>.page-head>.page-title09 h1,
  #app.ui15.live-ui>.docs-shell>.page-head>.page-title09 h1{font-size:34px!important;line-height:1.05!important;filter:drop-shadow(0 2px 0 #1b0d05)}
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>.page-head>.page-title09>.icon,
  #app.ui15.live-ui>.docs-shell>.page-head>.page-title09>.icon{width:32px!important;height:34px!important}
  /* the header is the top bar only */
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>.page-head.has-title09,
  #app.ui15.live-ui>.docs-shell>.page-head.has-title09{min-height:0!important;height:auto!important}
  /* per page: the first row's height (the title centres on it) and the row that makes room */
  #app.ui15.live-ui>.workspace.page-mine{--r1-35:54px}
  #app.ui15.live-ui>.workspace.page-tickets{--r1-35:56px}
  #app.ui15.live-ui>.workspace:is(.page-my-fox,.page-my-fox-rewards){--r1-35:44px}
  #app.ui15.live-ui>.workspace.page-trait-hunt{--r1-35:52px}
  #app.ui15.live-ui>.workspace.page-account{--r1-35:90px}
  #app.ui15.live-ui>.docs-shell{--r1-35:64px}
  #app.ui15.live-ui>.docs-shell>.page-head>.page-title09{top:100%;left:20px}
  #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:calc(var(--pt35-w,240px) + 22px)!important;min-width:0}
  /* a page whose first block is a whole panel (Trait Hunt without a hunt, an error panel): the title sits inside its top-left */
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home):has(>#main>.panel.empty:first-child)>.page-head>.page-title09{left:34px;top:calc(100% + 26px)}
  #app.ui15.live-ui>.docs-shell>.docs-header{padding-left:calc(var(--pt35-w,240px) + 40px)!important}
  /* Account: the Claimable strip beside the title - one row from 1600 px, two rows below (the claimable total and the action on top, Rewards | Trait Hunt under them) */
  #app#app.ui15.live-ui>.workspace.page-account [data-account-root]>.acc-basket{grid-template-columns:auto minmax(0,1fr) minmax(170px,240px);
    grid-template-areas:"art total act" "mid mid mid";gap:8px 16px;padding-top:8px;padding-bottom:8px}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket-art{grid-area:art}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket-total{grid-area:total}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket-act{grid-area:act}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket-mid{grid-area:mid;border:0;border-top:1px solid #6d53b8;padding:8px 0 0;min-height:0}
}
@media screen and (min-width:1600px){
  #app#app.ui15.live-ui>.workspace.page-account [data-account-root]>.acc-basket{grid-template-columns:auto minmax(140px,160px) minmax(240px,1fr) minmax(170px,190px);
    grid-template-areas:none;gap:0 14px}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket>*{grid-area:auto}
  #app#app.ui15.live-ui>.workspace.page-account .acc-basket-mid{border:0;border-left:1px solid #6d53b8;border-right:1px solid #6d53b8;padding:0 12px;align-self:stretch}
  #app#app.ui15.live-ui>.workspace.page-account .acc-part+.acc-part{padding-left:12px}
}
@media screen and (min-width:1200px) and (max-height:780px){
  #app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>.page-head>.page-title09 h1,
  #app.ui15.live-ui>.docs-shell>.page-head>.page-title09 h1{font-size:30px!important}
}

/* ---------------------------------------------------------------- 2. «рамочки внутри рамочек… сверху идёт с полукруглыми краями, а
   снизу ровно обрывается». One rule for every page: an inner frame is always a whole frame - rounded at the top AND at the
   bottom, 14 px inside the page frame on every side (was: panels ran into the page frame's bottom line with square lower
   corners). A page taller than the frame scrolls; while more content is below, its lower edge fades out instead of cutting a
   frame in half (data-more35, ui.mjs). Home: the hero picture is the page itself (no inner frame); its stat plaques are
   whole plaques 14 px above the frame line. */
@media screen and (min-width:701px){
  #app#app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)>#main{padding-bottom:14px!important}
  #app#app.ui15.live-ui>.workspace>#main>.panel:last-child,#app#app.ui15.live-ui>.workspace>#main>:last-child>.panel,
  #app#app.ui15.live-ui>.workspace.page-trait-hunt .live-hunt .hunt-right08>.panel:last-child,
  #app#app.ui15.live-ui>.workspace.page-home .home-stats>.stat{border-bottom-left-radius:8px!important;border-bottom-right-radius:8px!important}
  #app#app.ui15.live-ui>.workspace.page-home .home-stats{bottom:14px!important}
  #app#app.ui15.live-ui>.workspace:not(.page-lucky-paw):not(.page-home)[data-more35]>#main{
    -webkit-mask:linear-gradient(#000 calc(100% - 34px),#0000) left top/calc(100% - 8px) 100% no-repeat,linear-gradient(#000,#000) right top/8px 100% no-repeat;
    mask:linear-gradient(#000 calc(100% - 34px),#0000) left top/calc(100% - 8px) 100% no-repeat,linear-gradient(#000,#000) right top/8px 100% no-repeat}
}

/* ---------------------------------------------------------------- 1. «для сцены без феннек сделать такую же, но где он будет по
   центру и pick a fennec будет под ним». My Fox without a Fennec (Wardrobe and Rewards & Return): the same painted scene, now
   composed around the middle - the silhouette stands in the centre (Wardrobe: on the painted dressing stage, which moves to
   the centre; Rewards: on the sand by the camp fire), the line and the one action directly under it. The scene is laid out
   in the panel's own units (container units): --u35 = one picture pixel; the picture keeps its height share and is placed so
   that the stand point is at the panel's centre; where the picture ends, the panel's night colour fades in symmetrically. */
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30{
  --pw35:1589;--ph35:989;--sx35:452;--sy35:690;--depth35:92;--vis35:700;--img35:url(/art/comp-32/wardrobe-1536.webp);
  container-type:size;position:relative;overflow:hidden;display:block!important;min-height:440px;flex:1 0 auto!important;padding:0!important;
  background:#070a1e!important;border-radius:8px!important}
html[data-c32=wardrobe-empty] #app#app .page-my-fox #main>.empty-fox-panel30{--img35:var(--c32-img)}
#app#app .page-my-fox-rewards #main>.empty-fox-panel30{--pw35:1482;--ph35:1061;--sx35:720;--sy35:872;--depth35:20;--vis35:700;--img35:url(/art/comp-32/rewards-1482.webp)}
html[data-c32=rewards-empty] #app#app .page-my-fox-rewards #main>.empty-fox-panel30{--img35:var(--c32-img)}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30>h2{position:absolute!important;left:0;right:0;top:16px;margin:0!important;z-index:3;text-align:center;
  text-shadow:0 1px 2px #000,0 0 12px #07061a}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .empty-fox30{
  --u35:calc(100cqh / var(--vis35));--edge35:max(0px,calc(50cqw - var(--sx35) * var(--u35)));--standy35:calc(100cqh - (var(--ph35) - var(--sy35)) * var(--u35));
  position:absolute!important;inset:0!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;min-height:0!important;
  display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:calc(var(--standy35) + var(--depth35) * var(--u35) + 10px) auto auto minmax(0,1fr)!important;
  justify-items:center;align-items:start;gap:0!important;
  background:
    linear-gradient(90deg,#070a1e var(--edge35),#070a1e00 calc(var(--edge35) + 12%),#070a1e00 calc(100% - var(--edge35) - 12%),#070a1e calc(100% - var(--edge35))),
    radial-gradient(ellipse 52% 64% at 50% calc(var(--standy35) - 12cqh),#0a0b2600 58%,#070a1ea6 100%),
    linear-gradient(#070a1ecc,#070a1e00 22%,#070a1e00 62%,#070a1ee6),
    var(--img35) calc(50cqw - var(--sx35) * var(--u35)) calc(100cqh - var(--ph35) * var(--u35))/calc(var(--pw35) * var(--u35)) calc(var(--ph35) * var(--u35)) no-repeat,
    #070a1e!important}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .ef30-stage{
  --st35:calc(300 * var(--u35) * 1.05);position:absolute!important;width:var(--st35)!important;left:calc(50cqw - var(--st35) / 2)!important;
  top:calc(var(--standy35) - var(--st35) * .84)!important;z-index:1}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .ef30-pedestal{display:none!important}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .ef30-line{grid-area:2/1!important;position:relative;z-index:2;margin:0!important;
  padding:0 16px!important;max-width:44ch!important;background:none!important;border:0!important;box-shadow:none!important;text-align:center;
  font:600 17px/1.4 Interface,sans-serif!important;color:#f3ecff!important;text-shadow:0 1px 2px #000,0 0 10px #07061a,0 0 18px #07061a}
#app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .ef30-action{grid-area:3/1!important;justify-self:center;position:relative;z-index:2;
  margin:12px 0 0!important;min-width:200px}
@media (max-width:700px){
  /* the phone page scrolls: the scene gets a definite height (a size container resolves cqh against it) */
  #app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30{height:520px!important;min-height:0;flex:none!important;--vis35:640}
  #app#app :is(.page-my-fox,.page-my-fox-rewards) #main>.empty-fox-panel30 .ef30-line{font-size:15px!important}
}

/* ---------------------------------------------------------------- 4. «Кнопка коннект какая-то дёрганная, cancel не ниже появляется,
   а сбоку и двигает всю строку». The wallet button keeps one width in every state (Connect / Confirm in your wallet /
   Connecting / the address); a long step label wraps to two small lines inside it. Cancel appears UNDER the button (same
   width, out of the row's flow), so nothing in the top bar moves; while Cancel is shown the step line (the same words as
   the button) stays for screen readers only. Phones: the button is the icon; Cancel drops under it, right-aligned. */
#app.ui15.live-ui .topbar09 .head-actions{--wb35:160px;--wc35-r:42px}
@media screen and (min-width:960px){
  #app.ui15.live-ui .topbar09 .head-actions>.wallet-button{width:var(--wb35)!important;min-width:var(--wb35)!important;max-width:var(--wb35)!important;
    padding-left:10px!important;padding-right:10px!important;overflow:hidden}
  #app.ui15.live-ui .topbar09 .head-actions>.wallet-button>.wallet-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #app.ui15.live-ui .topbar09 .head-actions:has(>[data-action="wallet-cancel"])>.wallet-button>.wallet-text{white-space:normal;font-size:11.5px!important;line-height:1.15!important;text-align:left}
}
#app#app.ui15.live-ui .topbar09 .head-actions>[data-action="wallet-cancel"]{position:absolute!important;top:calc(100% + 6px);right:var(--wc35-r);z-index:31;
  width:var(--wb35)!important;min-width:0!important;max-width:none!important;height:30px!important;min-height:30px!important;max-height:30px!important;
  padding:0 10px!important;font-size:13px!important;box-shadow:0 6px 18px #02010c99}
#app.ui15.live-ui .topbar09 .head-actions:has(>[data-action="wallet-cancel"])>.live-status{position:absolute!important;width:1px;height:1px;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;padding:0!important;border:0!important}
@media screen and (min-width:701px) and (max-width:959px){#app.ui15.live-ui .topbar09 .head-actions>[data-action="wallet-cancel"]{width:auto!important;min-width:84px!important}}
@media screen and (max-width:700px){
  #app.ui15.live-ui .topbar09 .head-actions{--wc35-r:35px}
  #app#app.ui15.live-ui .topbar09 .head-actions>[data-action="wallet-cancel"]{width:auto!important;min-width:72px!important;height:28px!important;min-height:28px!important;max-height:28px!important;font-size:12px!important}
}

/* ---------------------------------------------------------------- 5. «когда табличка выплывает, не красиво первые миллисекунды фон
   на окно это наползает». The dimmed, blurred backdrop used to appear at full strength in the first frame while the window was
   still fading in over it. Now both come in together: the backdrop fades over the same 180 ms as the window
   (viewport.css dialog-enter); the Fennec chooser's over its 160 ms. Reduced motion: both appear at once. */
@keyframes backdrop35-in{from{opacity:0}to{opacity:1}}
dialog[open]::backdrop{animation:backdrop35-in 180ms var(--ease-ui,cubic-bezier(.2,.7,.2,1)) both}
.fennec-chooser[open]::backdrop{animation-duration:160ms}
dialog[open]{animation-fill-mode:both}
@media (prefers-reduced-motion:reduce){dialog[open]::backdrop{animation:none!important}}
