/* Shared shell interaction layer: the same surfaces and motion across routes. */
:root{--motion-fast:140ms;--motion-page:220ms;--shell-focus:#f6c761;--shell-surface:linear-gradient(145deg,#1b211aed,#0d1510f5)}
.app-bar{background:linear-gradient(180deg,#121911f5,#0c110ded);box-shadow:0 1px 0 #e0c58a08}
.app-rail{background:linear-gradient(180deg,#11170ffb,#080d0afb)}
.rail-link,.tab-link,.bar-search,.bar-account,.sheet-grid>*{transition:background var(--motion-fast) var(--ease),border-color var(--motion-fast) var(--ease),color var(--motion-fast) var(--ease)}
.rail-link,.tab-link,.bar-actions button,.bar-brand,.sheet-grid>*{user-select:none;-webkit-user-select:none}
button,a,input,select,textarea,summary{touch-action:manipulation}
.rail-link:focus-visible,.tab-link:focus-visible,.bar-search:focus-visible,.bar-account:focus-visible,.bar-rewards:focus-visible,.sheet-grid>*:focus-visible,.account-back:focus-visible{outline:2px solid var(--shell-focus);outline-offset:3px}
.sheet-grid>[aria-current=page]{border-color:var(--bronze-light);background:#d0b47716;color:var(--gold)}
.more-sheet{max-height:85svh;overflow:auto;overscroll-behavior:contain;background:var(--shell-surface);box-shadow:0 -12px 70px #0007}
.more-sheet h2{padding-right:44px;line-height:1.3}
.sheet-handle{display:block;width:36px;height:4px;margin:-6px auto 20px;border-radius:999px;background:#d0b47755}
.sheet-grid{gap:12px}
.sheet-grid>*{min-width:0;line-height:1.4}
.sheet-grid>*:active,.tab-link:active{background:#d0b47724;color:var(--gold)}
::view-transition-old(page){animation:shell-page-out 120ms var(--ease) both}
::view-transition-new(page),.view-enter{animation:shell-page-in var(--motion-page) var(--ease) both}
@keyframes shell-page-out{to{opacity:0}}
@keyframes shell-page-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(min-width:701px){.app-dialog:not(.more-sheet){background:var(--shell-surface)}.bar-title{gap:12px}.bar-search{border-radius:8px}.rail-link{border-radius:10px}}
@media(max-width:700px){
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .app-bar{gap:8px;padding-inline:12px}
  .bar-search{height:44px;flex-basis:44px;width:44px}
  .bar-actions{gap:4px}
  .bar-account[data-community-action]{min-width:44px;height:44px;padding:6px;justify-content:center}
  .bar-rewards{min-width:44px;min-height:44px;justify-content:center;padding:8px}
  .tab-bar{gap:4px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#151d15f5,#0d140ffb);box-shadow:0 -4px 24px #0003}
  .tab-link{position:relative;justify-content:center;min-height:54px;gap:5px;padding:7px 3px;font-size:10px;line-height:1.2}
  .tab-link span{white-space:nowrap}
  .tab-link svg{width:21px;height:21px;flex-shrink:0}
  .tab-link[aria-current]{background:#d0b47712;color:#f3d28e}
  .tab-link[aria-current]:before{content:'';position:absolute;top:0;width:20px;height:2px;border-radius:99px;background:var(--bronze-light)}
  .tab-link[aria-expanded=true]{background:#d0b47720;color:var(--gold)}
  .more-sheet{padding:20px 18px calc(24px + env(safe-area-inset-bottom));border-color:#b99a5e66;border-bottom:0}
  .more-sheet .dialog-close{min-width:44px;min-height:44px;top:15px;right:14px}
  .sheet-grid>*{min-height:82px;font-size:12px;gap:10px;background:#0d1510b3;border-radius:12px}
  .community-close{width:44px;height:44px}
  .community-popout{max-height:calc(100svh - 110px - env(safe-area-inset-top));overscroll-behavior:contain}
  .account-back{min-height:44px;display:inline-flex;align-items:center;top:14px}
  .account-help-link a,.account-alternate a{min-height:44px;display:inline-flex;align-items:center}
  .platform-tabs button{min-height:80px}
}
@media(hover:none){.button:hover,.rail-brand:hover,.rail-link:hover svg,.text-link:hover svg,.text-button:hover svg,.button:hover>svg{transform:none}.button:active{transform:none;filter:brightness(1.06)}}
@media(prefers-reduced-motion:reduce){::view-transition-old(page),::view-transition-new(page),.view-enter{animation:none!important}}
html[data-motion=reduce]::view-transition-old(page),html[data-motion=reduce]::view-transition-new(page){animation:none!important}
