/* ANKLE OS shell — dump.fm energy: left apps · right friends · bottom messages
 * Collapsible on all surfaces. Mobile-first. Ankle96 chrome. No indigo.
 * v=20260712-shell1
 */
:root{
  --aos-left-w: 188px;
  --aos-right-w: 196px;
  --aos-bottom-h: 52px;
  --aos-bottom-open: min(42vh, 320px);
  --aos-z: 9000;
  --aos-bg: #c0c0c0;
  --aos-panel: #d4d0c8;
  --aos-ink: #000;
  --aos-dim: #404040;
  --aos-line: #000;
}

/* body padding when panels open (desktop) */
body.aos-has-shell{ min-height: 100vh; }
@media(min-width:901px){
  body.aos-left-open{ padding-left: var(--aos-left-w); }
  body.aos-right-open{ padding-right: var(--aos-right-w); }
  body.aos-bottom-open{ padding-bottom: var(--aos-bottom-h); }
}
@media(max-width:900px){
  body.aos-left-open,
  body.aos-right-open,
  body.aos-bottom-open{ padding-left:0; padding-right:0; padding-bottom:0; }
}

/* ── edge tabs (always reachable) ── */
.aos-tab{
  position: fixed; z-index: calc(var(--aos-z) + 2);
  background: var(--aos-bg); color: var(--aos-ink);
  border: 2px solid; border-color: #fff #808080 #808080 #fff;
  font: 10px/1 "Courier New", Courier, monospace;
  text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; padding: 6px 8px;
  box-shadow: none !important; border-radius: 0 !important;
}
.aos-tab:hover{ background: #000; color: #fff; }
.aos-tab-left{
  left: 0; top: 42%; transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center; margin-left: 18px;
}
.aos-tab-right{
  right: 0; top: 42%; transform: translateY(-50%) rotate(90deg);
  transform-origin: right center; margin-right: 18px;
}
.aos-tab-bottom{
  left: 50%; bottom: 0; transform: translateX(-50%);
  border-bottom: 0;
}
body.aos-left-open .aos-tab-left{ display: none; }
body.aos-right-open .aos-tab-right{ display: none; }
body.aos-bottom-open .aos-tab-bottom{ bottom: var(--aos-bottom-h); }
body.aos-bottom-expanded .aos-tab-bottom{ bottom: var(--aos-bottom-open); }

/* ── panels ── */
.aos-panel{
  position: fixed; z-index: var(--aos-z);
  background: var(--aos-bg); color: var(--aos-ink);
  border: 2px solid; border-color: #fff #000 #000 #fff;
  font: 11px/1.35 "Courier New", Courier, monospace;
  display: flex; flex-direction: column;
  box-shadow: none !important; border-radius: 0 !important;
}
.aos-panel[hidden]{ display: none !important; }

.aos-hd{
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: #000; color: #fff;
  padding: 4px 6px; text-transform: uppercase; letter-spacing: .05em;
  flex: 0 0 auto;
}
.aos-hd button{
  background: var(--aos-bg); color: #000; border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font: 10px "Courier New", monospace; padding: 0 6px; cursor: pointer;
  min-width: 18px; height: 16px;
}
.aos-hd button:hover{ background: #fff; }

.aos-body{ flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; padding: 6px; }
.aos-sec{
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--aos-dim); margin: 8px 0 4px; border-bottom: 1px solid #808080; padding-bottom: 2px;
}
.aos-link{
  display: block; padding: 4px 6px; color: #000 !important; text-decoration: none !important;
  border: 1px solid transparent;
}
.aos-link:hover, .aos-link.active{
  background: #000 !important; color: #fff !important;
}
.aos-link .dim{ color: inherit; opacity: .7; font-size: 10px; }

/* left */
#aos-left{
  left: 0; top: 0; bottom: 0; width: var(--aos-left-w);
  border-left: 0;
}
/* rail must clear the bottom player bar — last items (LAYOUT tools) were hidden */
body.aos-bottom-open #aos-left{ bottom: var(--aos-bottom-h); }
body.aos-bottom-open #aos-right{ bottom: var(--aos-bottom-h); }
/* right */
#aos-right{
  right: 0; top: 0; bottom: 0; width: var(--aos-right-w);
  border-right: 0;
}
/* bottom bar */
#aos-bottom{
  left: 0; right: 0; bottom: 0; height: var(--aos-bottom-h);
  border-bottom: 0; flex-direction: column;
}
body.aos-bottom-expanded #aos-bottom{ height: var(--aos-bottom-open); }
#aos-bottom .aos-bottom-bar{
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; flex: 0 0 var(--aos-bottom-h);
  border-top: 1px solid #808080; background: var(--aos-panel);
}
#aos-bottom .aos-bottom-bar input{
  flex: 1; min-width: 0; border: 2px solid; border-color: #808080 #fff #fff #808080;
  background: #fff; padding: 5px 8px; font: 12px "Courier New", monospace;
}
#aos-bottom .aos-bottom-bar button{
  border: 2px solid; border-color: #fff #808080 #808080 #fff;
  background: var(--aos-bg); padding: 4px 8px; font: 10px "Courier New", monospace;
  text-transform: uppercase; cursor: pointer;
}
#aos-bottom .aos-bottom-bar button.primary{ background: #000; color: #fff; border-color: #000; }
#aos-bottom .aos-drawer{
  display: none; flex: 1; overflow: auto; padding: 6px 8px; background: #fff;
  border-top: 1px solid #000;
}
body.aos-bottom-expanded #aos-bottom .aos-drawer{ display: block; }

/* friends rows */
.aos-friend{
  display: flex; align-items: center; gap: 6px; padding: 4px 2px;
  border-bottom: 1px solid #ddd; cursor: pointer;
}
.aos-friend:hover{ background: #eee; }
.aos-friend img, .aos-friend .av{
  width: 22px; height: 22px; border: 1px solid #999; background: #ddd;
  object-fit: cover; flex: 0 0 22px;
}
.aos-friend .av{
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.aos-friend .name{ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aos-dot{
  width: 7px; height: 7px; border: 1px solid #000; background: #808080; flex: 0 0 7px;
}
.aos-dot.on{ background: #00a000; }
.aos-muted{ color: var(--aos-dim); font-size: 10px; padding: 6px 2px; }
.aos-badge{
  display: inline-block; min-width: 14px; padding: 0 4px; background: #000; color: #fff;
  font-size: 9px; text-align: center; margin-left: 4px;
}

/* top editable chips strip (optional secondary) */
#aos-topchips{
  position: sticky; top: 0; z-index: calc(var(--aos-z) - 1);
  display: none; gap: 0; flex-wrap: wrap;
  background: var(--aos-bg); border-bottom: 1px solid #000;
  padding: 0; font: 10px "Courier New", monospace;
}
body.aos-top-open #aos-topchips{ display: flex; }
#aos-topchips a{
  padding: 5px 8px; border-right: 1px solid #999; color: #000 !important;
  text-decoration: none !important; text-transform: uppercase;
}
#aos-topchips a:hover, #aos-topchips a.on{ background: #000 !important; color: #fff !important; }
#aos-topchips .aos-edit{
  margin-left: auto; border: 0; border-left: 1px solid #999;
  background: transparent; padding: 5px 8px; cursor: pointer;
  font: 10px "Courier New", monospace; text-transform: uppercase;
}

/* mobile drawers overlay content instead of permanent padding */
@media(max-width:900px){
  #aos-left, #aos-right{
    width: min(86vw, 280px);
    box-shadow: 4px 0 0 rgba(0,0,0,.15);
  }
  #aos-right{ box-shadow: -4px 0 0 rgba(0,0,0,.15); }
  .aos-tab-left{ margin-left: 14px; }
  .aos-tab-right{ margin-right: 14px; }
  /* dim page when a side drawer is open */
  body.aos-left-open::after,
  body.aos-right-open::after{
    content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35);
    z-index: calc(var(--aos-z) - 1); pointer-events: auto;
  }
}

/* hide legacy thin top rail when full shell is present to avoid double chrome */
body.aos-has-shell #ankle-os-rail{ display: none !important; }

/* don't fight world edit chrome / full canvas editors if marked */
body.aos-shell-disabled .aos-tab,
body.aos-shell-disabled .aos-panel,
body.aos-shell-disabled #aos-topchips{ display: none !important; }

/* Custom scrollbar for OS panels to match the red/green theme */
.aos-body::-webkit-scrollbar, .aos-drawer::-webkit-scrollbar { width: 8px; height: 8px; }
.aos-body::-webkit-scrollbar-track, .aos-drawer::-webkit-scrollbar-track { background: red; border-left: 1px solid #000; }
.aos-body::-webkit-scrollbar-thumb, .aos-drawer::-webkit-scrollbar-thumb { background: #00ff00; border: 1px solid #000; }
