/* vibe-shell v33 — hide legal footer on phone */
:root { --dock-h: 0px; }
.has-side {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.vibe-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.vibe-side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 8px 10px;
  background: var(--bg, #0a0a0a);
  border-right: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  z-index: 45;
  overflow-y: auto;
  min-height: 0;
}
.side-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: inherit;
  text-align: center;
}
.side-user:hover { background: rgba(255, 255, 255, 0.04); border-radius: 12px; }
.side-avatar {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.side-avatar[hidden] { display: none !important; }
.side-avatar img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--bg);
}
html[data-avatar-size="small"] .side-avatar,
html[data-avatar-size="small"] .side-avatar img {
  width: 72px;
  height: 72px;
}
html[data-avatar-size="large"] .side-avatar,
html[data-avatar-size="large"] .side-avatar img {
  width: 176px;
  height: 176px;
}
.side-name {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}
.side-nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 4px 8px;
  border-radius: 10px;
  color: var(--text, #f4f4f5);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  text-align: left;
}
.side-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.side-item[hidden] { display: none !important; }
.side-item,
.side-toggle,
.vibe-dock a,
.vibe-dock button { touch-action: manipulation; }
.side-item:hover { background: rgba(255, 255, 255, 0.04); }
.side-item.on {
  background: rgba(139, 124, 247, 0.22);
  box-shadow: inset 3px 0 0 #8b7cf7, inset 0 0 18px rgba(62, 232, 168, 0.08);
}
.side-foot {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.side-opts.on {
  background: rgba(139, 124, 247, 0.22);
  box-shadow: inset 3px 0 0 #8b7cf7, inset 0 0 18px rgba(62, 232, 168, 0.08);
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 10px 6px 4px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  color: inherit;
  text-decoration: none;
}
.side-brand img {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(153, 69, 255, 0.55));
}
.side-brand b {
  display: block;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.side-brand small {
  display: block;
  font-size: 0.85rem;
  color: var(--cyan, #22d3ee);
  font-weight: 700;
}
.side-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 8px 4px;
  font-size: 0.82rem;
  font-weight: 700;
}
.side-legal a { color: var(--muted, #a1a1aa); text-decoration: none; }
.side-legal a:hover { color: var(--mint, #14f195); }
.side-legal a.on { color: var(--text, #f4f4f5); }
.side-legal a[hidden] { display: none !important; }
.side-toggle {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  background: var(--surface-2);
  color: #d4d4d8;
  place-items: center;
  flex-shrink: 0;
}
.side-close {
  display: none;
}
.vibe-dock { display: none; }
.side-toggle:hover { border-color: rgba(153, 69, 255, 0.55); color: #f4f4f5; }
.side-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 44;
}
.opts-x-wrap {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  margin-top: 4px;
}
.opts-x-wrap > span {
  display: block;
  padding: 0 0 8px;
  color: var(--muted, #a1a1aa);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.opts-x-wrap input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  background: var(--surface-2);
  color: var(--text, #f4f4f5);
  font-weight: 700;
  font-size: 13px;
  outline: none;
}
.opts-x-wrap input:focus { border-color: rgba(153, 69, 255, 0.7); }
.has-side .linux {
  left: calc(300px + 16px);
  z-index: 90;
}
.linux[hidden] { display: none !important; }

.av-sheet {
  width: min(420px, 100%);
  padding: 16px 18px 18px;
  text-align: center;
}
.av-sheet .tok-head { margin-bottom: 8px; text-align: left; }
.av-hint {
  margin: 0 0 14px;
  color: var(--muted, #a1a1aa);
  font-size: 13px;
  font-weight: 600;
}
.av-preview-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.08);
  cursor: grab;
  touch-action: none;
  position: relative;
}
.av-preview-wrap:active { cursor: grabbing; }
.av-preview-wrap canvas,
.av-preview-wrap img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.av-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted, #a1a1aa);
  font-size: 12px;
  font-weight: 700;
}
.av-preview-wrap.has-photo .av-preview-empty { display: none; }
.av-file-hint {
  margin: 0 0 12px;
  color: var(--muted, #a1a1aa);
  font-size: 12px;
  font-weight: 600;
}
.av-browse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  background: var(--surface-2);
  font-weight: 700;
}
.av-browse:hover { border-color: rgba(153, 69, 255, 0.55); }
.av-sliders {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-bottom: 12px;
}
.av-sliders label {
  display: grid;
  gap: 4px;
  color: var(--muted, #a1a1aa);
  font-size: 12px;
  font-weight: 700;
}
.av-sliders input[type="range"] {
  width: 100%;
  accent-color: #8b7cf7;
}
.av-reset {
  margin: 0 0 14px;
  color: var(--muted, #a1a1aa);
  font-weight: 700;
  font-size: 13px;
}
.av-reset:hover { color: var(--text, #f4f4f5); }
.av-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.av-actions .btn,
.av-actions .btn-ghost { width: 100%; min-height: 42px; }

@media (max-width: 767px) {
  .has-side .linux,
  .linux { display: none !important; }
  .has-side { display: block; }
  .vibe-side {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, calc(100vw - 44px));
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    z-index: 80;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }
  body.side-open { overflow: hidden; }
  body.side-open .vibe-side { transform: none; }
  .side-toggle { display: none !important; }
  .nav-home { display: none !important; }
  .side-scrim { z-index: 70; }
  body.side-open .side-scrim { display: block; }
  :root { --dock-h: 64px; }
  .side-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 10px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.06));
    background: var(--surface-2);
    color: var(--text, #f4f4f5);
    font-size: 22px;
    line-height: 1;
    z-index: 2;
  }
  .side-avatar,
  .side-avatar img {
    width: 88px;
    height: 88px;
  }
  html[data-avatar-size="small"] .side-avatar,
  html[data-avatar-size="small"] .side-avatar img {
    width: 56px;
    height: 56px;
  }
  html[data-avatar-size="large"] .side-avatar,
  html[data-avatar-size="large"] .side-avatar img {
    width: 140px;
    height: 140px;
  }
  .side-user { padding-top: 28px; }
  nav.vibe-dock,
  .vibe-dock {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    z-index: 46 !important;
    gap: 4px !important;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    background: color-mix(in srgb, var(--bg, #0a0a0a) 92%, transparent) !important;
    backdrop-filter: blur(16px);
    border: 0 !important;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06)) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  nav.vibe-dock a,
  nav.vibe-dock button,
  .vibe-dock a,
  .vibe-dock button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-height: 56px !important;
    min-width: 44px !important;
    width: 100% !important;
    height: auto !important;
    padding: 4px 2px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    border: 0 !important;
    color: var(--muted, #a1a1aa) !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
  }
  nav.vibe-dock a img,
  nav.vibe-dock button img,
  .vibe-dock a img,
  .vibe-dock button img,
  nav.vibe-dock a svg,
  .vibe-dock a svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
    margin: 0 !important;
  }
  nav.vibe-dock a.on,
  nav.vibe-dock button.on,
  .vibe-dock a.on,
  .vibe-dock button.on {
    color: var(--text, #f4f4f5) !important;
    background: rgba(139, 124, 247, 0.2) !important;
  }
  .vibe-main {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px);
  }
  .vibe-legal,
  .side-legal { display: none !important; }
}

.vibe-legal {
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 12px;
  padding: 18px 4px 10px;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  color: var(--muted, #a1a1aa);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}
.vibe-legal p { margin: 0 0 6px; }
.vibe-legal a {
  color: var(--text, #f4f4f5);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.vibe-legal a:hover { color: var(--mint, #14f195); }
