/* Grok Bot Shelf. X styling: Lights out dark by default, X light via data-theme. */
:root{
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --blue:#1d9bf0; --blue-h:#1a8cd8;
    --bg:#000; --text:#e7e9ea; --text2:#71767b; --line:#2f3336; --line2:#536471; --hover:#16181c; --field:#202327;
    --menu:#16181c; --mark:rgba(29,155,240,.28);
    --pill:#eff3f4; --pill-ink:#0f1419; --pill-h:#d7dbdc;
    --head:rgba(0,0,0,.65);
}
html[data-theme="light"]{
  --bg:#fff; --text:#0f1419; --text2:#536471; --line:#eff3f4; --line2:#cfd9de; --hover:#f7f9f9; --field:#eff3f4;
  --menu:#fff; --blue:#1d9bf0; --blue-h:#1a8cd8; --mark:rgba(29,155,240,.18);
  --pill:#0f1419; --pill-ink:#fff; --pill-h:#272c30;
  --head:rgba(255,255,255,.85);
}
:root{color-scheme:dark}
html[data-theme="light"]{color-scheme:light}
html,body{background:var(--bg);overscroll-behavior-y:auto}
html.theme-anim,html.theme-anim *{transition:background-color .2s ease,color .2s ease,border-color .2s ease,fill .2s ease,stroke .2s ease!important}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:84px}
body{margin:0;background:var(--bg);color:var(--text);font:400 15px/1.4 var(--font);-webkit-font-smoothing:antialiased;min-height:100vh;overflow-x:hidden}
a{color:inherit}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.wrap{width:100%;max-width:1120px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
:focus-visible{outline:none}
:where(a,button,select,.card):focus-visible{box-shadow:0 0 0 2px var(--blue)}

/* Hero: title and add link */
.hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:max(28px,env(safe-area-inset-top));padding-bottom:20px}
h1{display:flex;align-items:center;gap:12px;margin:0;white-space:nowrap;min-width:0;font-size:clamp(26px,4vw,34px);font-weight:800;letter-spacing:-.03em;line-height:1.1}
/* Bot face from iBot: the body never moves, only the eyes group does (app.js sets its transform). */
.botface{display:block;flex:none;width:36px;height:36px;transform:rotate(-35deg);overflow:visible}
.bf-body{fill:var(--text)}
.bf-eye{fill:var(--bg)}
.pill-outline{flex:none;display:inline-flex;align-items:center;height:36px;padding:0 16px;border-radius:9999px;border:1px solid var(--line2);font-weight:700;font-size:15px;text-decoration:none;transition:background .2s}
.pill-outline:hover{background:var(--hover)}
.hero-actions{display:flex;align-items:center;gap:8px;flex:none}
.theme-btn{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border-radius:9999px;border:1px solid var(--line2);background:transparent;color:var(--text);cursor:pointer;transition:background .2s}
.theme-btn:hover{background:var(--hover)}
.theme-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-btn .sun{display:none}
html[data-theme="light"] .theme-btn .sun{display:block}
html[data-theme="light"] .theme-btn .moon{display:none}

/* Sticky header with search, the only translucent surface */
.dock{position:sticky;top:0;z-index:20;padding:max(8px,env(safe-area-inset-top)) 0 8px;background:var(--head);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.dock{background:var(--bg)}}
.capsule{display:flex;align-items:center;height:44px;border-radius:9999px;background:var(--field);border:1px solid transparent;padding:0 4px 0 16px;transition:border-color .15s,background .15s}
.capsule:focus-within{background:var(--bg);border-color:var(--blue)}
.capsule:focus-within .i-search{stroke:var(--blue)}
.i-search{width:18px;height:18px;flex:none;fill:none;stroke:var(--text2);stroke-width:2.2;stroke-linecap:round}
#q{flex:1;min-width:0;height:100%;border:0;background:none;color:var(--text);font:inherit;font-size:15px;padding:0 12px;outline:none}
#q::placeholder{color:var(--text2)}
#q::-webkit-search-cancel-button{-webkit-appearance:none}
.hint{font:500 12px/1 var(--font);color:var(--text2);border:1px solid var(--line);border-radius:6px;padding:4px 6px;margin-right:8px}
@media (hover:none){.hint{display:none}}
.divider{width:1px;height:20px;background:var(--line);flex:none}
.sortwrap{position:relative;flex:none}
#sort{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:var(--text);font:700 14px var(--font);height:36px;padding:0 30px 0 12px;border-radius:9999px;cursor:pointer}
#sort:hover{background:var(--hover)}
#sort option{background:var(--menu);color:var(--text)}
.sortwrap svg{position:absolute;right:10px;top:50%;width:16px;height:16px;margin-top:-8px;fill:none;stroke:var(--text2);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}

/* Filters: creator tabs and category pills */
.filters{display:flex;flex-direction:column;gap:12px;margin-top:4px}
.seg{position:relative;display:flex;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.seg::-webkit-scrollbar{display:none}
.seg button{position:relative;z-index:1;flex:none;display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 16px;border:0;background:none;color:var(--text2);font:500 15px var(--font);cursor:pointer;transition:background .2s,color .2s}
.seg button:hover{background:var(--hover)}
.seg button img{width:20px;height:20px;border-radius:50%;display:block}
.seg button[aria-checked="true"]{color:var(--text);font-weight:700}
.seg .n{font-size:13px;color:var(--text2);font-weight:400;font-variant-numeric:tabular-nums}
.thumb{position:absolute;z-index:2;bottom:0;left:0;height:4px;border-radius:9999px;background:var(--blue);
  transform:translateX(calc(var(--tx,0px) + 16px));width:calc(var(--tw,0px) - 32px);transition:transform .25s ease,width .25s ease}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:2px 16px 4px}
.chips::-webkit-scrollbar{display:none}
@media (min-width:900px){.chips{flex-wrap:wrap;margin:0;padding:2px 0 4px}}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 14px;border-radius:9999px;border:1px solid var(--line);background:transparent;color:var(--text);font:500 14px var(--font);cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.chip:hover{background:var(--hover)}
.chip .n{font-size:13px;color:var(--text2);font-variant-numeric:tabular-nums}
.chip[aria-pressed="true"]{background:var(--pill);color:var(--pill-ink);border-color:var(--pill);font-weight:700}
.chip[aria-pressed="true"] .n{color:inherit;opacity:.65}
.chip.zero:not([aria-pressed="true"]){color:var(--text2)}
.status{display:flex;align-items:center;gap:12px;min-height:36px;margin:8px 0 4px}
.count{margin:0;font-size:13px;color:var(--text2);font-variant-numeric:tabular-nums}
.clear{border:0;background:none;color:var(--blue);font:700 13px var(--font);padding:6px 10px;border-radius:9999px;cursor:pointer}
.clear:hover{background:var(--mark)}

/* Groups and cards */
.group{margin:16px 0 36px}
.ghead{display:flex;align-items:center;gap:12px;margin:0 0 12px}
.ghead img{width:40px;height:40px;border-radius:50%;flex:none}
.ghead h2{margin:0;font-size:17px;font-weight:700;letter-spacing:-.01em;line-height:1.25;min-width:0}
.ghead .handle,.ghead .gn{font-size:15px;font-weight:400;color:var(--text2);text-decoration:none}
.ghead .handle:hover{text-decoration:underline}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.flat{margin-top:16px;margin-bottom:36px}
.card{display:flex;flex-direction:column;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--bg);outline:none;transition:background .2s;content-visibility:auto;contain-intrinsic-size:auto 200px}
.card:hover{background:var(--hover)}
.card.active,.card:focus-visible{box-shadow:0 0 0 2px var(--blue)}
.card.flash{animation:flash 1.6s ease-out}
@keyframes flash{0%,40%{background:var(--mark);box-shadow:0 0 0 2px var(--blue)}}
.head{display:flex;gap:12px;align-items:center;margin-bottom:10px}
.icon{flex:none;width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-size:22px;line-height:1;border:1px solid var(--line)}
.card h3{margin:0;font-size:15px;font-weight:700;line-height:1.3}
.card h3 a{text-decoration:none}
.card h3 a:hover{text-decoration:underline}
.sub{display:flex;align-items:center;gap:5px;margin-top:2px;font-size:13px;color:var(--text2);white-space:nowrap;overflow:hidden}
.sub img{width:16px;height:16px;border-radius:50%;flex:none}
.desc{margin:0 0 14px;font-size:15px;line-height:1.4;color:var(--text);flex:1}
mark{background:var(--mark);color:inherit;border-radius:3px}
.foot-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tools{display:flex;gap:2px;margin-left:-8px}
.ib{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:9999px;border:0;background:none;color:var(--text2);cursor:pointer;text-decoration:none;transition:background .15s,color .15s}
.ib:hover{background:var(--mark);color:var(--blue)}
.ib svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ib svg.fill{fill:currentColor;stroke:none;width:15px;height:15px}
.get,.btn{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 16px;border:0;border-radius:9999px;background:var(--pill);color:var(--pill-ink);font:700 14px var(--font);text-decoration:none;cursor:pointer;transition:background .15s}
.get:hover,.btn:hover{background:var(--pill-h)}

/* Empty, add, toast */
.empty{text-align:center;padding:48px 16px;margin:16px 0 36px;border:1px solid var(--line);border-radius:16px}
.empty-t{margin:0 0 4px;font-size:20px;font-weight:800;letter-spacing:-.02em}
.empty-s{margin:0 0 16px;color:var(--text2)}
.add{border:1px solid var(--line);border-radius:16px;padding:20px;margin:8px 0 max(48px,env(safe-area-inset-bottom));max-width:640px}
.add h2{margin:0 0 6px;font-size:20px;font-weight:800;letter-spacing:-.02em}
.add p{margin:0 0 16px;color:var(--text2);line-height:1.45}
.add p a{color:var(--blue);text-decoration:none}
.add p a:hover{text-decoration:underline}
.btn.post{background:var(--blue);color:#fff;height:36px}
.btn.post:hover{background:var(--blue-h)}
.btn.post svg{width:14px;height:14px;fill:currentColor}
.add .fine{margin:16px 0 0;font-size:13px;color:var(--text2)}
.toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));z-index:50;padding:12px 16px;border-radius:4px;background:var(--blue);color:#fff;font-size:15px;
  box-shadow:0 0 15px rgba(101,119,134,.2),0 0 3px 1px rgba(101,119,134,.15);transform:translate(-50%,16px);opacity:0;transition:transform .2s,opacity .2s;pointer-events:none}
.toast.show{transform:translate(-50%,0);opacity:1}
@media (max-width:640px){.grid{grid-template-columns:1fr}.hero{gap:10px}.hero h1{font-size:22px;gap:8px}.hero .botface{width:28px;height:28px}.hero .pill-outline{height:36px;padding:0 14px;font-size:14px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
