/* Auction Clips Studio dashboard shell (public/shared/shell.css).
   Load after theme.css. Layout: left rail | (top bar, page, footer).
   2026-12-02 restyle, iOS-inspired but our own brand:
   - rail on the page ground, outline icons (CSS masks keyed on data-nav), a neutral
     grey pill for the active item, no lot numbers or uppercase labels;
   - below 1000px a collapsed rail (icon over a short label);
   - below 640px an iOS-style bottom tab bar, and "More" opens a grouped sheet;
   - grouped inset lists (.group / .row) with chevrons and press states;
   - app-size titles (32px), sentence-case chips, safe-area insets.
   No glass or blur: bars are opaque (house rule). --live is used ONLY for the LIVE pill. */

/* ---- icons: 24px stroke SVGs used as masks, so they take currentColor ---- */
:root{
  --ic-home:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
  --ic-gameplan:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Cpath d='M4 6h.01M4 12h.01M4 18h.01' stroke-width='3'/%3E%3C/svg%3E");
  --ic-prompter:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='3'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E");
  --ic-overlays:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 8l10 5 10-5z'/%3E%3Cpath d='m2 13 10 5 10-5M2 18l10 5 10-5'/%3E%3C/svg%3E");
  --ic-analytics:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 20v-8M12 20V4M19 20v-5'/%3E%3C/svg%3E");
  --ic-clips:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M8.6 7.6 20 18M8.6 16.4 20 6'/%3E%3C/svg%3E");
  --ic-account:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
  --ic-more:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='1.8'/%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Ccircle cx='19' cy='12' r='1.8'/%3E%3C/svg%3E");
  --ic-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
}
.ic{flex:none;display:inline-block;width:22px;height:22px;background-color:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}

body.shell{display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);min-height:100vh;min-height:100dvh}

/* ---- rail ---- */
.rail{position:sticky;top:0;height:100vh;height:100dvh;display:flex;flex-direction:column;gap:22px;padding:16px 12px;background:var(--bg);border-right:1px solid var(--line);overflow-y:auto}
.rail-brand{display:flex;align-items:center;gap:10px;padding:6px 10px;min-height:44px;font-size:20px;color:var(--text)}
.rail-brand .paddle{flex:none}
.rail-list{list-style:none;display:flex;flex-direction:column;gap:2px}
.rail-item{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:var(--dim);font:600 15px var(--body);text-align:left;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .15s,color .15s,transform .18s var(--press)}
a.rail-item:hover,.rail-more:hover{color:var(--text);background:rgba(255,255,255,.05)}
.rail-item:active{transform:scale(.97)}
.rail-item.is-active{color:var(--text);background:rgba(255,255,255,.09)}
.rail-item.is-active .rail-lot{color:var(--accent)}
/* the lot number span becomes the item's icon: digits hidden, mask chosen by data-nav */
.rail-lot{flex:none;width:22px;height:22px;font-size:0;line-height:0;background-color:currentColor;-webkit-mask:var(--ic,var(--ic-home)) center/contain no-repeat;mask:var(--ic,var(--ic-home)) center/contain no-repeat}
[data-nav="/"] .rail-lot{--ic:var(--ic-home)}
[data-nav="/gameplan/"] .rail-lot{--ic:var(--ic-gameplan)}
[data-nav="/teleprompter/"] .rail-lot{--ic:var(--ic-prompter)}
[data-nav="/overlay/"] .rail-lot{--ic:var(--ic-overlays)}
[data-nav="/analytics/"] .rail-lot{--ic:var(--ic-analytics)}
[data-nav="/clips/"] .rail-lot{--ic:var(--ic-clips)}
[data-nav="/account/"] .rail-lot{--ic:var(--ic-account)}
.rail-more .rail-lot{--ic:var(--ic-more)}
.rail-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rail-tag{flex:none;font:600 12px var(--body);color:var(--faint);background:var(--surface);border-radius:999px;padding:2px 8px}
.rail-item.is-soon{cursor:default;color:var(--faint)}
.rail-item.is-soon:active{transform:none}
.rail-more-li{display:none}
@media (prefers-reduced-motion:reduce){.rail-item,.rail-item:active{transition:none;transform:none}}

/* ---- top bar (opaque, no blur) ---- */
.shell-main{display:flex;flex-direction:column;min-width:0}
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:16px;height:var(--topbar-h);padding:0 var(--gut);background:var(--bg);border-bottom:1px solid var(--line)}
.picker{display:flex;align-items:center;gap:10px;min-width:0;margin-right:auto}
.picker-label{font:600 14px var(--body);color:var(--dim)}
.picker select{min-height:40px;max-width:min(420px,52vw);padding:0 36px 0 14px;border:0;border-radius:10px;background:var(--surface);color:var(--text);font:600 15px var(--body);text-overflow:ellipsis}
.picker select:focus-visible{outline:3px solid var(--accent);outline-offset:0}
.picker select:disabled{color:var(--faint);cursor:not-allowed}

/* LIVE pill: sentence case; the text always says the state, so colour is never the only signal */
.live-pill{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 12px;border-radius:999px;background:var(--surface);font:600 14px var(--body);color:var(--dim);white-space:nowrap}
.live-dot{width:8px;height:8px;border-radius:50%;background:var(--faint)}
.live-pill.is-live{color:var(--live);background:rgba(239,65,54,.14)}
.live-pill.is-live .live-dot{background:var(--live);animation:live-pulse 1.4s ease-in-out infinite}
@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.live-pill.is-live .live-dot{animation:none}}

/* ---- page ---- */
.studio-page{width:100%;max-width:1120px;padding:36px var(--gut) 72px;font-variant-numeric:tabular-nums}
.studio-head{margin-bottom:28px}
.studio-head h1{font:800 32px/1.1 var(--display);letter-spacing:-.02em}
.studio-head .intro-lg{margin-top:10px;font-size:17px;line-height:1.5;color:var(--dim);max-width:640px}
.studio-head .access-badge{margin:0 0 12px}
.studio-page .hint{margin-top:28px;font-size:15px;color:var(--dim);max-width:720px}
.studio-page h2{font-size:22px;line-height:1.2}

/* paddle-number mark: a round head on a short handle, pure CSS */
.paddle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;margin-bottom:8px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font:800 11px var(--body)}
.paddle::after{content:"";position:absolute;left:50%;top:100%;width:6px;height:9px;margin-left:-3px;margin-top:-2px;border-radius:0 0 3px 3px;background:var(--accent)}

/* ---- chips (sentence case, never squeezed) ---- */
.badge{flex:none;display:inline-flex;align-items:center;min-height:24px;padding:0 10px;border-radius:999px;font:600 13px var(--body);white-space:nowrap}
.badge-free,.badge-early{background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.badge-paid{background:var(--raised);color:var(--dim)}

/* ---- panels and cards (tone step, no border, no shadow) ---- */
.card{display:flex;flex-direction:column;gap:12px;padding:20px;background:var(--surface);border-radius:var(--r-panel)}
.card-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.card-lot{font:600 14px var(--body);color:var(--dim);white-space:nowrap}
.card h2{font-size:22px;line-height:1.15}
.card p{color:var(--soft);font-size:15px;line-height:1.5}
.card .btn{align-self:flex-start}
.card-soon{display:inline-flex;align-items:center;min-height:44px;font:600 14px var(--body);color:var(--faint)}

/* ---- grouped inset list (iOS style) ---- */
.studio-page .group-title{margin:32px 0 8px 16px;font:600 15px var(--body);letter-spacing:0;color:var(--dim)}
.group{list-style:none;background:var(--surface);border-radius:var(--r-panel);overflow:hidden}
.group>li{position:relative}
.group>li+li::before{content:"";position:absolute;left:54px;right:0;top:0;height:1px;background:var(--line)}
.row{display:grid;grid-template-columns:22px minmax(0,1fr) auto 14px;align-items:center;gap:4px 16px;min-height:64px;padding:12px 16px;color:var(--text);text-decoration:none;-webkit-tap-highlight-color:transparent;transition:background-color .12s}
a.row:hover{background:rgba(255,255,255,.04)}
a.row:active{background:var(--raised)}
.row .ic{color:var(--dim)}
.row-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.row-title{font:600 17px/1.3 var(--body)}
.row-sub{font:500 14px/1.4 var(--body);color:var(--dim)}
.row-meta{font:600 14px var(--body);color:var(--faint);white-space:nowrap}
.row-meta.is-accent{color:var(--accent)}
.row .chev{width:14px;height:14px;color:var(--faint);--ic:var(--ic-chev)}
.ic-home{--ic:var(--ic-home)} .ic-gameplan{--ic:var(--ic-gameplan)} .ic-prompter{--ic:var(--ic-prompter)}
.ic-overlays{--ic:var(--ic-overlays)} .ic-analytics{--ic:var(--ic-analytics)} .ic-clips{--ic:var(--ic-clips)}

.shell-main footer{margin-top:auto;border-top:0;padding-top:12px}
.shell-main .foot-in{padding:0 var(--gut)}
.shell-main footer .brand{font-size:17px}

/* ---- tablet: collapsed rail ---- */
@media (max-width:1000px){
  body.shell{grid-template-columns:var(--rail-w-collapsed) minmax(0,1fr)}
  .rail{padding:14px 6px;gap:14px}
  .rail-brand{justify-content:center;padding:6px 0}
  .rail-brand-name{display:none}
  .rail-item{flex-direction:column;justify-content:center;gap:4px;padding:8px 2px;text-align:center}
  .rail-label{font-size:11px;width:100%}
  .rail-tag{display:none}
}

/* ---- phone: iOS-style bottom tab bar + "More" sheet ---- */
@media (max-width:640px){
  :root{--gut:20px}
  body.shell{display:block}
  .rail{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:60;height:auto;flex-direction:row;padding:4px 4px calc(4px + env(safe-area-inset-bottom));background:#161618;border-right:0;border-top:1px solid var(--line);overflow:visible}
  .rail-brand{display:none}
  .rail nav{flex:1}
  .rail-list{flex-direction:row;gap:0}
  .rail-list>li{flex:1;min-width:0}
  .rail-item{min-height:52px;gap:3px;background:transparent!important}
  .rail-item.is-active{color:var(--accent)}
  .rail-label{font-size:11px;font-weight:600}
  .rail-extra{display:none}
  .rail-more-li{display:block}
  .rail.is-more-open .rail-extra{display:block;position:fixed;left:10px;right:10px;z-index:61;background:var(--raised)}
  .rail.is-more-open .rail-extra-1{bottom:calc(70px + env(safe-area-inset-bottom) + 112px);border-radius:14px 14px 0 0}
  .rail.is-more-open .rail-extra-2{bottom:calc(70px + env(safe-area-inset-bottom) + 56px);border-top:1px solid #48484A}
  .rail.is-more-open .rail-extra-3{bottom:calc(70px + env(safe-area-inset-bottom));border-top:1px solid #48484A;border-radius:0 0 14px 14px}
  .rail.is-more-open .rail-extra .rail-item{flex-direction:row;justify-content:flex-start;gap:14px;min-height:56px;padding:8px 16px;text-align:left;color:var(--text)}
  .rail.is-more-open .rail-extra .rail-label{font-size:17px;font-weight:500}
  .topbar{gap:10px;height:56px;padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top))}
  .picker-label{display:none}
  .shell-main{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .studio-page{padding-top:20px}
  .studio-head h1{font-size:28px}
  .row{grid-template-columns:22px minmax(0,1fr) 14px}
  .row-main{grid-column:2;grid-row:1}
  .row-meta{grid-column:2;grid-row:2;font-size:13px}
  .row-meta:empty{display:none}
  .row .chev{grid-column:3;grid-row:1 / span 2}
  .row>.ic:first-child{grid-row:1 / span 2}
  .row{gap:4px 14px;padding:12px 14px}
}
