/* EarnViral shell (new design): fixed 52px header (styles in ev.css), 56px icon rail on the left, page under both.
   On phones the rail is a bottom bar and the menu lives in the header's sheet. Load after ev.css. */
body.ev-shell{background:#fff;padding-top:52px;padding-left:56px;display:block;min-height:100vh}
.ev-rail{position:fixed;left:0;top:52px;bottom:0;width:56px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 0;z-index:30}
.ev-rail a,.ev-rail button{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;color:#475569;background:none;border:0;padding:0;flex:none}
.ev-rail a:hover,.ev-rail button:hover{background:#F1F5F9;color:var(--dark)}
.ev-rail .on{background:var(--pale);color:var(--green)}
.ev-rail .on:hover{background:var(--pale);color:var(--green)}
.ev-rail .sp{flex:1}
.ev-main{padding:22px 28px;max-width:1440px;min-width:0}
/* shared bits of the new pages */
.sh-h{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.sh-title{font-size:22px;font-weight:800;margin:0}
.sh-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 16px;border-radius:11px;background:var(--green);color:#fff;font-weight:700;font-size:13px;border:0;white-space:nowrap;cursor:pointer}
.sh-btn:hover{background:var(--green-d);color:#fff}
.sh-btn.dark{background:var(--dark)}.sh-btn.dark:hover{background:#1E293B}
.sh-btn.ghost{background:#fff;color:var(--dark);border:1px solid var(--line)}.sh-btn.ghost:hover{border-color:#94A3B8;background:#fff;color:var(--dark)}
.sh-btn.sm{padding:6px 10px;border-radius:9px}
.sh-btn:disabled,.sh-btn[aria-disabled=true]{opacity:.35;cursor:not-allowed;pointer-events:none}
.sh-chip{padding:6px 10px;border-radius:9px;border:1px solid var(--line);font-size:12px;font-weight:600;background:#fff;color:var(--dark);white-space:nowrap;cursor:pointer}
.sh-chip.on{border:2px solid var(--green);background:var(--pale);color:var(--green);padding:5px 9px}
.sh-chips{display:flex;gap:6px;flex-wrap:wrap}
.sh-card{border:1px solid var(--line);border-radius:16px;padding:18px 20px;background:#fff}
.sh-card .sh-ch{font-size:14px;font-weight:800;margin-bottom:6px}
.sh-tag{font-size:11px;font-weight:800;padding:3px 9px;border-radius:999px;background:#F3E8FF;color:#7C3AED;white-space:nowrap}
.sh-search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:0 12px;width:240px;max-width:100%;color:#94A3B8;background:#fff}
.sh-search input{border:0;outline:0;padding:9px 0;width:100%;min-width:0;font:inherit;font-size:13px;color:var(--dark);background:none}
.sh-bar{height:8px;border-radius:4px;background:#E2E8F0;overflow:hidden}.sh-bar>i{display:block;height:8px;border-radius:4px;background:var(--green);transition:width .3s}
.sh-empty{padding:40px 16px;text-align:center;color:#94A3B8;font-size:13px;font-weight:600;grid-column:1/-1}
.sh-err{padding:12px 14px;border-radius:12px;background:#FEF2F2;border:1px solid #FECACA;color:var(--red);font-size:13px;margin-bottom:14px}
.sh-dlg{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:60;padding:16px}
.sh-dlg>div{width:460px;max-width:100%;max-height:100%;overflow:auto;background:#fff;border-radius:18px;padding:22px;display:flex;flex-direction:column;gap:12px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.sh-dlg b{font-size:17px;font-weight:800}
.sh-dlg label.ck{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.5}
.sh-dlg label.ck input{width:18px;height:18px;flex:none;margin-top:2px;accent-color:var(--green)}
.sh-dlg .acts{display:flex;gap:8px;justify-content:flex-end}
.sh-thumb{position:relative;width:100%;aspect-ratio:16/9;border-radius:10px;background:linear-gradient(160deg,#64748B,#0F172A);overflow:hidden}
.sh-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.sh-sw{width:36px;height:20px;border-radius:10px;background:#CBD5E1;position:relative;border:0;padding:0;flex:none;cursor:pointer;transition:background .15s}
.sh-sw::after{content:"";position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .15s}
.sh-sw[aria-checked=true]{background:var(--green)}.sh-sw[aria-checked=true]::after{left:19px}
.sh-sw:disabled{cursor:not-allowed}
@media (max-width:820px){
  body.ev-shell{padding-left:0;padding-bottom:calc(56px + env(safe-area-inset-bottom))}
  .ev-rail{top:auto;bottom:0;left:0;right:0;width:auto;height:calc(56px + env(safe-area-inset-bottom));padding:6px 8px env(safe-area-inset-bottom);flex-direction:row;justify-content:space-around;border-right:0;border-top:1px solid var(--line)}
  .ev-rail .sp{display:none}
  .ev-rail a,.ev-rail button{width:44px;height:40px}
  .ev-main{padding:16px}
  .sh-title{font-size:20px}
  .sh-search{width:100%}
}
/* ---------- phones (2026-12-02): no rail (its sections are a row of chips), thumb-sized controls, dialogs as bottom sheets ---------- */
.ev-railchips{display:none}
@media (max-width:820px){
  body.ev-shell{padding-bottom:env(safe-area-inset-bottom)}
  .ev-rail{display:none!important}
  .ev-main{padding:16px 16px 24px}
  .ev-railchips{display:flex;gap:8px;overflow-x:auto;margin:0 -16px 14px;padding:2px 16px;scrollbar-width:none}.ev-railchips::-webkit-scrollbar{display:none}
  .sh-chip{min-height:40px;padding:0 15px;border-radius:12px;font-size:15px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none}
  .sh-chip.on{padding:0 14px}
  .sh-chip::after{content:"";position:absolute;left:0;right:0;top:-2px;bottom:-2px}
  .sh-chips{gap:8px}
  .sh-btn{min-height:44px;padding:0 18px;font-size:15px;border-radius:12px}
  .sh-btn.sm{min-height:40px;padding:0 14px;font-size:14px}
  .sh-title{font-size:26px}
  .sh-h{margin-bottom:14px}
  /* search: an icon that opens into a field */
  .sh-search{width:44px;height:44px;padding:0;justify-content:center;border:0;color:#475569;transition:width .2s}
  .sh-search input{width:0;padding:0}
  .sh-search:focus-within,.sh-search:has(input:not(:placeholder-shown)){width:100%;border:1px solid var(--line);padding:0 12px;justify-content:flex-start}
  .sh-search:focus-within input,.sh-search:has(input:not(:placeholder-shown)) input{width:100%;padding:11px 0;font-size:16px}
  .sh-h:has(.sh-search:focus-within) .sh-title{display:none}
  /* dialogs slide up from the bottom */
  .sh-dlg{align-items:flex-end;padding:0}
  .sh-dlg>div{width:100%;border-radius:24px 24px 0 0;padding:14px 20px calc(20px + env(safe-area-inset-bottom));max-height:88vh}
  .sh-dlg>div::before{content:"";display:block;width:40px;height:5px;border-radius:3px;background:#CBD5E1;margin:0 auto 6px;flex:none}
  .sh-dlg .acts .sh-btn{flex:1}
  .sh-sw{width:52px;height:30px;border-radius:15px}.sh-sw::after{width:24px;height:24px}.sh-sw[aria-checked=true]::after{left:25px}
}
