/* Каркас: верхня панель, три зони на десктопі; на телефоні - плеєр на весь екран, шторки і нижня навігація. */
.shell { height: 100dvh; display: grid; grid-template-rows: var(--top-h) 1fr; }

.top {
  display: flex; align-items: center; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--line-soft);
  background: var(--bg); position: relative; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600;
  font-size: var(--fs-lg); letter-spacing: -.01em; padding: 6px 4px; }
.tabs { display: flex; gap: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-md);
  text-decoration: none; color: var(--text-2); font-weight: 500; transition: background var(--t-fast), color var(--t-fast);
}
.tab:hover { background: var(--raise); color: var(--text); }
.tab[aria-current=page] { background: var(--raise); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tab svg.ic { width: 18px; height: 18px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-login { color: var(--text-3); font-size: var(--fs-sm); padding: 0 4px; }

.work {
  min-height: 0; display: grid; grid-template-columns: minmax(270px, 320px) 1fr minmax(320px, 380px);
}
.center { min-width: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; padding: 16px 16px 14px; gap: 12px; }
.right { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; border-left: 1px solid var(--line-soft);
  background: var(--panel); }
.side { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line-soft); background: var(--panel); }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 8px; }
.sheet-title { font-size: var(--fs-md); font-weight: 600; }
.sheet-grip { display: none; }
.sheet [data-sheet-close] { display: none; }

.tabbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; opacity: 0; transition: opacity var(--t-mid); }
.scrim.on { opacity: 1; }

.jobs { min-height: 0; overflow-y: auto; }

/* Вузький десктоп: ховаємо праву колонку в шторку */
@media (max-width: 1180px) and (min-width: 900px) {
  .work { grid-template-columns: 280px 1fr 320px; }
}

/* Телефон */
@media (max-width: 899px) {
  .shell { grid-template-rows: 1fr calc(var(--tab-h) + var(--safe-b)); }
  .top { display: none; }
  .work { grid-row: 1; display: block; position: relative; min-height: 0; }
  .center { height: 100%; padding: 0; gap: 0; grid-template-rows: 1fr var(--act-h); }
  .right { display: contents; }
  .jobs { grid-row: 1; }

  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 82dvh;
    display: flex; flex-direction: column; background: var(--panel); border: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0; padding-bottom: var(--safe-b);
    transform: translateY(105%); visibility: hidden;
    transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
  }
  .sheet.open { transform: none; visibility: visible; transition: transform var(--t-slow) var(--ease), visibility 0s; }
  .side.sheet { height: 82dvh; }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
  .sheet [data-sheet-close] { display: inline-flex; }
  .sheet-head { padding: 6px 8px 6px 16px; }

  .tabbar {
    grid-row: 2; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: var(--safe-b);
    background: var(--bg); border-top: 1px solid var(--line-soft); z-index: 20;
  }
  .tb {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; color: var(--text-2); font-size: 11px; font-weight: 500; text-decoration: none;
    min-height: 44px; transition: color var(--t-fast);
  }
  .tb:active { color: var(--text); }
  .tb[aria-current=page], .tb.on { color: var(--accent); }
  .tb svg.ic { width: 22px; height: 22px; }
  .tb .badge { position: absolute; top: 5px; left: calc(50% + 6px); }
}
