/* Shared narrow icon rail — use on .portal.rail-shell */

.rail-shell {
  grid-template-columns: 84px minmax(0, 1fr);
}

.rail-shell .leftbar {
  width: 84px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.rail-shell .leftbar .logo {
  font-size: 18px;
  letter-spacing: -1px;
  text-align: center;
  margin: 0 0 6px;
  line-height: 1.1;
}

.rail-shell .leftbar .tagline,
.rail-shell .side-card {
  display: none !important;
}

.rail-shell .primary-nav {
  gap: 2px;
}

.rail-shell .primary-nav hr {
  margin: 6px 4px;
}

.rail-shell .nav,
.rail-shell a.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  text-align: center;
  border-radius: 12px;
  min-height: 52px;
}

.rail-shell .nav span {
  width: auto;
  font-size: 18px;
  line-height: 1;
  color: #c9a9ff;
}

.rail-shell .nav em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: #aab0d2;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-shell .nav.active em,
.rail-shell .nav:hover em,
.rail-shell .nav.yellow em {
  color: #ffe600;
}

.rail-shell .nav-countdown {
  font-size: 8px;
  font-weight: 700;
  color: #ff374f;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.rail-shell .topbar {
  padding-left: 12px;
}

.rail-shell .topbar .search {
  width: min(560px, calc(100% - 220px));
}

@media (max-width: 760px) {
  .rail-shell {
    grid-template-columns: 1fr;
  }

  .rail-shell .leftbar {
    width: min(280px, 86vw);
    padding: 17px 12px;
  }

  .rail-shell .leftbar .logo {
    font-size: 28px;
    text-align: left;
  }

  .rail-shell .nav,
  .rail-shell a.nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 8px;
    padding: 10px 12px;
    min-height: 0;
    text-align: left;
  }

  .rail-shell .nav span {
    width: 28px;
  }

  .rail-shell .nav em {
    font-size: 13px;
    color: inherit;
  }

  .rail-shell .nav-countdown {
    margin-left: auto;
    font-size: 11px;
  }
}
